OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ | 5 #ifndef UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ |
6 #define UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ | 6 #define UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/string16.h" | 12 #include "base/string16.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
14 #include "base/timer.h" | 14 #include "base/timer.h" |
15 #include "ui/gfx/image/image_skia.h" | 15 #include "ui/gfx/image/image_skia.h" |
| 16 #include "ui/gfx/native_widget_types.h" |
16 #include "ui/message_center/message_center_export.h" | 17 #include "ui/message_center/message_center_export.h" |
17 #include "ui/notifications/notification_types.h" | 18 #include "ui/notifications/notification_types.h" |
18 | 19 |
19 namespace base { | 20 namespace base { |
20 class DictionaryValue; | 21 class DictionaryValue; |
21 } | 22 } |
22 | 23 |
23 namespace message_center { | 24 namespace message_center { |
24 | 25 |
25 // A helper class to manage the list of notifications. | 26 // A helper class to manage the list of notifications. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 virtual ~Delegate() {} | 71 virtual ~Delegate() {} |
71 | 72 |
72 // Removes notifications | 73 // Removes notifications |
73 virtual void SendRemoveNotification(const std::string& id) = 0; | 74 virtual void SendRemoveNotification(const std::string& id) = 0; |
74 virtual void SendRemoveAllNotifications() = 0; | 75 virtual void SendRemoveAllNotifications() = 0; |
75 | 76 |
76 // Disables notifications | 77 // Disables notifications |
77 virtual void DisableNotificationByExtension(const std::string& id) = 0; | 78 virtual void DisableNotificationByExtension(const std::string& id) = 0; |
78 virtual void DisableNotificationByUrl(const std::string& id) = 0; | 79 virtual void DisableNotificationByUrl(const std::string& id) = 0; |
79 | 80 |
80 // Requests the Delegate to the settings dialog. | 81 // Requests the Delegate to show the settings page. |
81 virtual void ShowNotificationSettings(const std::string& id) = 0; | 82 virtual void ShowNotificationSettings(const std::string& id) = 0; |
82 | 83 |
| 84 // Requests the Delegate to show the settings dialog. |
| 85 virtual void ShowNotificationSettingsDialog(gfx::NativeView context) = 0; |
| 86 |
83 // Called when a notification is clicked on. | 87 // Called when a notification is clicked on. |
84 virtual void OnNotificationClicked(const std::string& id) = 0; | 88 virtual void OnNotificationClicked(const std::string& id) = 0; |
85 | 89 |
86 // Called when the quiet mode status has been changed. | 90 // Called when the quiet mode status has been changed. |
87 virtual void OnQuietModeChanged(bool quiet_mode) = 0; | 91 virtual void OnQuietModeChanged(bool quiet_mode) = 0; |
88 | 92 |
89 // Called when a button in a notification is clicked. |button_index| | 93 // Called when a button in a notification is clicked. |button_index| |
90 // indicates which button was clicked, zero-indexed (button one is 0, | 94 // indicates which button was clicked, zero-indexed (button one is 0, |
91 // button two is 1). | 95 // button two is 1). |
92 virtual void OnButtonClicked(const std::string& id, int button_index) = 0; | 96 virtual void OnButtonClicked(const std::string& id, int button_index) = 0; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 size_t unread_count_; | 210 size_t unread_count_; |
207 bool quiet_mode_; | 211 bool quiet_mode_; |
208 scoped_ptr<base::OneShotTimer<NotificationList> > quiet_mode_timer_; | 212 scoped_ptr<base::OneShotTimer<NotificationList> > quiet_mode_timer_; |
209 | 213 |
210 DISALLOW_COPY_AND_ASSIGN(NotificationList); | 214 DISALLOW_COPY_AND_ASSIGN(NotificationList); |
211 }; | 215 }; |
212 | 216 |
213 } // namespace message_center | 217 } // namespace message_center |
214 | 218 |
215 #endif // UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ | 219 #endif // UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ |
OLD | NEW |