blob: 70675233293179c66f636f56be93e89e35492d9e [file] [log] [blame]
[email protected]7fde24af72013-05-28 17:19:031// Copyright 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "ui/message_center/notification_delegate.h"
6
awdff42998e2016-10-13 16:58:547#include "base/logging.h"
8
[email protected]7fde24af72013-05-28 17:19:039namespace message_center {
10
[email protected]657116e2014-04-09 14:10:1611// NotificationDelegate:
12
petercf29ede82014-10-30 23:19:1913void NotificationDelegate::Display() {}
14
petercf29ede82014-10-30 23:19:1915void NotificationDelegate::Close(bool by_user) {}
16
[email protected]7fde24af72013-05-28 17:19:0317bool NotificationDelegate::HasClickedListener() { return false; }
18
petercf29ede82014-10-30 23:19:1919void NotificationDelegate::Click() {}
20
[email protected]7fde24af72013-05-28 17:19:0321void NotificationDelegate::ButtonClick(int button_index) {}
22
awdff42998e2016-10-13 16:58:5423void NotificationDelegate::ButtonClickWithReply(int button_index,
24 const base::string16& reply) {
25 NOTIMPLEMENTED();
26}
27
miguelgb688a842015-10-21 13:19:2128void NotificationDelegate::SettingsClick() {}
29
30bool NotificationDelegate::ShouldDisplaySettingsButton() {
31 return false;
32}
33
[email protected]657116e2014-04-09 14:10:1634// HandleNotificationClickedDelegate:
35
[email protected]120a0dd2013-08-02 08:44:1236HandleNotificationClickedDelegate::HandleNotificationClickedDelegate(
37 const base::Closure& closure)
38 : closure_(closure) {
39}
40
petercf29ede82014-10-30 23:19:1941HandleNotificationClickedDelegate::~HandleNotificationClickedDelegate() {}
[email protected]120a0dd2013-08-02 08:44:1242
43bool HandleNotificationClickedDelegate::HasClickedListener() {
44 return !closure_.is_null();
45}
46
47void HandleNotificationClickedDelegate::Click() {
[email protected]846d6212014-02-06 01:53:4748 if (!closure_.is_null())
49 closure_.Run();
[email protected]120a0dd2013-08-02 08:44:1250}
51
[email protected]657116e2014-04-09 14:10:1652// HandleNotificationButtonClickDelegate:
53
54HandleNotificationButtonClickDelegate::HandleNotificationButtonClickDelegate(
55 const ButtonClickCallback& button_callback)
56 : button_callback_(button_callback) {
57}
58
59HandleNotificationButtonClickDelegate::
petercf29ede82014-10-30 23:19:1960 ~HandleNotificationButtonClickDelegate() {}
[email protected]657116e2014-04-09 14:10:1661
62void HandleNotificationButtonClickDelegate::ButtonClick(int button_index) {
63 if (!button_callback_.is_null())
64 button_callback_.Run(button_index);
65}
66
bmalcolm4607efe2016-09-19 19:42:1667bool NotificationDelegate::ShouldDisplayOverFullscreen() const {
68 return false;
69}
70
[email protected]7fde24af72013-05-28 17:19:0371} // namespace message_center