Chromium Code Reviews| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 the settings dialog. |
| 81 virtual void ShowNotificationSettings(const std::string& id) = 0; | 82 virtual void ShowNotificationSettings(const std::string& id) = 0; |
| 82 | 83 |
| 84 virtual void ShowNotificationSettingsDialog(gfx::NativeView context) = 0; | |
|
Daniel Erat
2013/01/24 03:16:21
nit: add a comment here too
Jun Mukai
2013/01/24 04:04:30
Done.
| |
| 85 | |
| 83 // Called when a notification is clicked on. | 86 // Called when a notification is clicked on. |
| 84 virtual void OnNotificationClicked(const std::string& id) = 0; | 87 virtual void OnNotificationClicked(const std::string& id) = 0; |
| 85 | 88 |
| 86 // Called when the quiet mode status has been changed. | 89 // Called when the quiet mode status has been changed. |
| 87 virtual void OnQuietModeChanged(bool quiet_mode) = 0; | 90 virtual void OnQuietModeChanged(bool quiet_mode) = 0; |
| 88 | 91 |
| 89 // Called when a button in a notification is clicked. |button_index| | 92 // Called when a button in a notification is clicked. |button_index| |
| 90 // indicates which button was clicked, zero-indexed (button one is 0, | 93 // indicates which button was clicked, zero-indexed (button one is 0, |
| 91 // button two is 1). | 94 // button two is 1). |
| 92 virtual void OnButtonClicked(const std::string& id, int button_index) = 0; | 95 virtual void OnButtonClicked(const std::string& id, int button_index) = 0; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 204 size_t unread_count_; | 207 size_t unread_count_; |
| 205 bool quiet_mode_; | 208 bool quiet_mode_; |
| 206 scoped_ptr<base::OneShotTimer<NotificationList> > quiet_mode_timer_; | 209 scoped_ptr<base::OneShotTimer<NotificationList> > quiet_mode_timer_; |
| 207 | 210 |
| 208 DISALLOW_COPY_AND_ASSIGN(NotificationList); | 211 DISALLOW_COPY_AND_ASSIGN(NotificationList); |
| 209 }; | 212 }; |
| 210 | 213 |
| 211 } // namespace message_center | 214 } // namespace message_center |
| 212 | 215 |
| 213 #endif // UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ | 216 #endif // UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ |
| OLD | NEW |