Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ui / message_center / notification_delegate.cc
blob09ef959dbf0c173c25ac9096117b12c8fd61577c
1 // 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.
5 #include "ui/message_center/notification_delegate.h"
7 namespace message_center {
9 // NotificationDelegate:
11 bool NotificationDelegate::HasClickedListener() { return false; }
13 void NotificationDelegate::ButtonClick(int button_index) {}
15 // HandleNotificationClickedDelegate:
17 HandleNotificationClickedDelegate::HandleNotificationClickedDelegate(
18 const base::Closure& closure)
19 : closure_(closure) {
22 HandleNotificationClickedDelegate::~HandleNotificationClickedDelegate() {
25 void HandleNotificationClickedDelegate::Display() {
28 void HandleNotificationClickedDelegate::Error() {
31 void HandleNotificationClickedDelegate::Close(bool by_user) {
34 bool HandleNotificationClickedDelegate::HasClickedListener() {
35 return !closure_.is_null();
38 void HandleNotificationClickedDelegate::Click() {
39 if (!closure_.is_null())
40 closure_.Run();
43 void HandleNotificationClickedDelegate::ButtonClick(int button_index) {
46 // HandleNotificationButtonClickDelegate:
48 HandleNotificationButtonClickDelegate::HandleNotificationButtonClickDelegate(
49 const ButtonClickCallback& button_callback)
50 : button_callback_(button_callback) {
53 HandleNotificationButtonClickDelegate::
54 ~HandleNotificationButtonClickDelegate() {
57 void HandleNotificationButtonClickDelegate::Display() {
60 void HandleNotificationButtonClickDelegate::Error() {
63 void HandleNotificationButtonClickDelegate::Close(bool by_user) {
66 void HandleNotificationButtonClickDelegate::Click() {
69 void HandleNotificationButtonClickDelegate::ButtonClick(int button_index) {
70 if (!button_callback_.is_null())
71 button_callback_.Run(button_index);
74 } // namespace message_center