Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: ui/message_center/notification_delegate.cc

Issue 1979583003: Support notifications with custom content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@messageview-close-button
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/message_center/notification_delegate.h" 5 #include "ui/message_center/notification_delegate.h"
6 6
7 #include "ui/views/view.h"
8
7 namespace message_center { 9 namespace message_center {
8 10
9 // NotificationDelegate: 11 // NotificationDelegate:
10 12
11 void NotificationDelegate::Display() {} 13 void NotificationDelegate::Display() {}
12 14
13 void NotificationDelegate::Close(bool by_user) {} 15 void NotificationDelegate::Close(bool by_user) {}
14 16
15 bool NotificationDelegate::HasClickedListener() { return false; } 17 bool NotificationDelegate::HasClickedListener() { return false; }
16 18
17 void NotificationDelegate::Click() {} 19 void NotificationDelegate::Click() {}
18 20
19 void NotificationDelegate::ButtonClick(int button_index) {} 21 void NotificationDelegate::ButtonClick(int button_index) {}
20 22
21 void NotificationDelegate::SettingsClick() {} 23 void NotificationDelegate::SettingsClick() {}
22 24
23 bool NotificationDelegate::ShouldDisplaySettingsButton() { 25 bool NotificationDelegate::ShouldDisplaySettingsButton() {
24 return false; 26 return false;
25 } 27 }
26 28
29 std::unique_ptr<views::View> NotificationDelegate::CreateCustomContent() {
30 return std::unique_ptr<views::View>();
31 }
32
27 // HandleNotificationClickedDelegate: 33 // HandleNotificationClickedDelegate:
28 34
29 HandleNotificationClickedDelegate::HandleNotificationClickedDelegate( 35 HandleNotificationClickedDelegate::HandleNotificationClickedDelegate(
30 const base::Closure& closure) 36 const base::Closure& closure)
31 : closure_(closure) { 37 : closure_(closure) {
32 } 38 }
33 39
34 HandleNotificationClickedDelegate::~HandleNotificationClickedDelegate() {} 40 HandleNotificationClickedDelegate::~HandleNotificationClickedDelegate() {}
35 41
36 bool HandleNotificationClickedDelegate::HasClickedListener() { 42 bool HandleNotificationClickedDelegate::HasClickedListener() {
(...skipping 14 matching lines...) Expand all
51 57
52 HandleNotificationButtonClickDelegate:: 58 HandleNotificationButtonClickDelegate::
53 ~HandleNotificationButtonClickDelegate() {} 59 ~HandleNotificationButtonClickDelegate() {}
54 60
55 void HandleNotificationButtonClickDelegate::ButtonClick(int button_index) { 61 void HandleNotificationButtonClickDelegate::ButtonClick(int button_index) {
56 if (!button_callback_.is_null()) 62 if (!button_callback_.is_null())
57 button_callback_.Run(button_index); 63 button_callback_.Run(button_index);
58 } 64 }
59 65
60 } // namespace message_center 66 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698