blob: 09ef959dbf0c173c25ac9096117b12c8fd61577c [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
7namespace message_center {
8
[email protected]657116e2014-04-09 14:10:169// NotificationDelegate:
10
[email protected]7fde24af72013-05-28 17:19:0311bool NotificationDelegate::HasClickedListener() { return false; }
12
13void NotificationDelegate::ButtonClick(int button_index) {}
14
[email protected]657116e2014-04-09 14:10:1615// HandleNotificationClickedDelegate:
16
[email protected]120a0dd2013-08-02 08:44:1217HandleNotificationClickedDelegate::HandleNotificationClickedDelegate(
18 const base::Closure& closure)
19 : closure_(closure) {
20}
21
22HandleNotificationClickedDelegate::~HandleNotificationClickedDelegate() {
23}
24
25void HandleNotificationClickedDelegate::Display() {
26}
27
28void HandleNotificationClickedDelegate::Error() {
29}
30
31void HandleNotificationClickedDelegate::Close(bool by_user) {
32}
33
34bool HandleNotificationClickedDelegate::HasClickedListener() {
35 return !closure_.is_null();
36}
37
38void HandleNotificationClickedDelegate::Click() {
[email protected]846d6212014-02-06 01:53:4739 if (!closure_.is_null())
40 closure_.Run();
[email protected]120a0dd2013-08-02 08:44:1241}
42
43void HandleNotificationClickedDelegate::ButtonClick(int button_index) {
44}
45
[email protected]657116e2014-04-09 14:10:1646// HandleNotificationButtonClickDelegate:
47
48HandleNotificationButtonClickDelegate::HandleNotificationButtonClickDelegate(
49 const ButtonClickCallback& button_callback)
50 : button_callback_(button_callback) {
51}
52
53HandleNotificationButtonClickDelegate::
54 ~HandleNotificationButtonClickDelegate() {
55}
56
57void HandleNotificationButtonClickDelegate::Display() {
58}
59
60void HandleNotificationButtonClickDelegate::Error() {
61}
62
63void HandleNotificationButtonClickDelegate::Close(bool by_user) {
64}
65
66void HandleNotificationButtonClickDelegate::Click() {
67}
68
69void HandleNotificationButtonClickDelegate::ButtonClick(int button_index) {
70 if (!button_callback_.is_null())
71 button_callback_.Run(button_index);
72}
73
[email protected]7fde24af72013-05-28 17:19:0374} // namespace message_center