Revert of Prepare HistoryQuickProvider for componentization (patchset #5 id:80001...
[chromium-blink-merge.git] / ui / message_center / notification_delegate.cc
blob07b97f3da9b325f39d9e769ebc7d815127f6e556
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 void NotificationDelegate::Display() {}
13 void NotificationDelegate::Close(bool by_user) {}
15 bool NotificationDelegate::HasClickedListener() { return false; }
17 void NotificationDelegate::Click() {}
19 void NotificationDelegate::ButtonClick(int button_index) {}
21 // HandleNotificationClickedDelegate:
23 HandleNotificationClickedDelegate::HandleNotificationClickedDelegate(
24 const base::Closure& closure)
25 : closure_(closure) {
28 HandleNotificationClickedDelegate::~HandleNotificationClickedDelegate() {}
30 bool HandleNotificationClickedDelegate::HasClickedListener() {
31 return !closure_.is_null();
34 void HandleNotificationClickedDelegate::Click() {
35 if (!closure_.is_null())
36 closure_.Run();
39 // HandleNotificationButtonClickDelegate:
41 HandleNotificationButtonClickDelegate::HandleNotificationButtonClickDelegate(
42 const ButtonClickCallback& button_callback)
43 : button_callback_(button_callback) {
46 HandleNotificationButtonClickDelegate::
47 ~HandleNotificationButtonClickDelegate() {}
49 void HandleNotificationButtonClickDelegate::ButtonClick(int button_index) {
50 if (!button_callback_.is_null())
51 button_callback_.Run(button_index);
54 } // namespace message_center