| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef UI_MESSAGE_CENTER_MESSAGE_CENTER_IMPL_H_ | 5 #ifndef UI_MESSAGE_CENTER_MESSAGE_CENTER_IMPL_H_ |
| 6 #define UI_MESSAGE_CENTER_MESSAGE_CENTER_IMPL_H_ | 6 #define UI_MESSAGE_CENTER_MESSAGE_CENTER_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // windows. It supports weak pointers in order to allow safe callbacks when | 78 // windows. It supports weak pointers in order to allow safe callbacks when |
| 79 // timers expire. | 79 // timers expire. |
| 80 class MESSAGE_CENTER_EXPORT PopupTimersController | 80 class MESSAGE_CENTER_EXPORT PopupTimersController |
| 81 : public base::SupportsWeakPtr<PopupTimersController>, | 81 : public base::SupportsWeakPtr<PopupTimersController>, |
| 82 public MessageCenterObserver { | 82 public MessageCenterObserver { |
| 83 public: | 83 public: |
| 84 explicit PopupTimersController(MessageCenter* message_center); | 84 explicit PopupTimersController(MessageCenter* message_center); |
| 85 virtual ~PopupTimersController(); | 85 virtual ~PopupTimersController(); |
| 86 | 86 |
| 87 // MessageCenterObserver implementation. | 87 // MessageCenterObserver implementation. |
| 88 virtual void OnNotificationDisplayed(const std::string& id) OVERRIDE; | 88 virtual void OnNotificationDisplayed( |
| 89 const std::string& id, |
| 90 const NotificationDisplaySource source) OVERRIDE; |
| 89 virtual void OnNotificationUpdated(const std::string& id) OVERRIDE; | 91 virtual void OnNotificationUpdated(const std::string& id) OVERRIDE; |
| 90 virtual void OnNotificationRemoved(const std::string& id, bool by_user) | 92 virtual void OnNotificationRemoved(const std::string& id, bool by_user) |
| 91 OVERRIDE; | 93 OVERRIDE; |
| 92 | 94 |
| 93 // Callback for each timer when its time is up. | 95 // Callback for each timer when its time is up. |
| 94 virtual void TimerFinished(const std::string& id); | 96 virtual void TimerFinished(const std::string& id); |
| 95 | 97 |
| 96 // Pauses all running timers. | 98 // Pauses all running timers. |
| 97 void PauseAll(); | 99 void PauseAll(); |
| 98 | 100 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 virtual void SetNotificationButtonIcon(const std::string& notification_id, | 172 virtual void SetNotificationButtonIcon(const std::string& notification_id, |
| 171 int button_index, | 173 int button_index, |
| 172 const gfx::Image& image) OVERRIDE; | 174 const gfx::Image& image) OVERRIDE; |
| 173 virtual void DisableNotificationsByNotifier( | 175 virtual void DisableNotificationsByNotifier( |
| 174 const NotifierId& notifier_id) OVERRIDE; | 176 const NotifierId& notifier_id) OVERRIDE; |
| 175 virtual void ClickOnNotification(const std::string& id) OVERRIDE; | 177 virtual void ClickOnNotification(const std::string& id) OVERRIDE; |
| 176 virtual void ClickOnNotificationButton(const std::string& id, | 178 virtual void ClickOnNotificationButton(const std::string& id, |
| 177 int button_index) OVERRIDE; | 179 int button_index) OVERRIDE; |
| 178 virtual void MarkSinglePopupAsShown(const std::string& id, | 180 virtual void MarkSinglePopupAsShown(const std::string& id, |
| 179 bool mark_notification_as_read) OVERRIDE; | 181 bool mark_notification_as_read) OVERRIDE; |
| 180 virtual void DisplayedNotification(const std::string& id) OVERRIDE; | 182 virtual void DisplayedNotification( |
| 183 const std::string& id, |
| 184 const NotificationDisplaySource source) OVERRIDE; |
| 181 virtual void SetNotifierSettingsProvider( | 185 virtual void SetNotifierSettingsProvider( |
| 182 NotifierSettingsProvider* provider) OVERRIDE; | 186 NotifierSettingsProvider* provider) OVERRIDE; |
| 183 virtual NotifierSettingsProvider* GetNotifierSettingsProvider() OVERRIDE; | 187 virtual NotifierSettingsProvider* GetNotifierSettingsProvider() OVERRIDE; |
| 184 virtual void SetQuietMode(bool in_quiet_mode) OVERRIDE; | 188 virtual void SetQuietMode(bool in_quiet_mode) OVERRIDE; |
| 185 virtual void EnterQuietModeWithExpire( | 189 virtual void EnterQuietModeWithExpire( |
| 186 const base::TimeDelta& expires_in) OVERRIDE; | 190 const base::TimeDelta& expires_in) OVERRIDE; |
| 187 virtual void RestartPopupTimers() OVERRIDE; | 191 virtual void RestartPopupTimers() OVERRIDE; |
| 188 virtual void PausePopupTimers() OVERRIDE; | 192 virtual void PausePopupTimers() OVERRIDE; |
| 189 | 193 |
| 190 // NotificationBlocker::Observer overrides: | 194 // NotificationBlocker::Observer overrides: |
| (...skipping 26 matching lines...) Expand all Loading... |
| 217 // Queue for the notifications to delay the addition/updates when the message | 221 // Queue for the notifications to delay the addition/updates when the message |
| 218 // center is visible. | 222 // center is visible. |
| 219 scoped_ptr<internal::ChangeQueue> notification_queue_; | 223 scoped_ptr<internal::ChangeQueue> notification_queue_; |
| 220 | 224 |
| 221 DISALLOW_COPY_AND_ASSIGN(MessageCenterImpl); | 225 DISALLOW_COPY_AND_ASSIGN(MessageCenterImpl); |
| 222 }; | 226 }; |
| 223 | 227 |
| 224 } // namespace message_center | 228 } // namespace message_center |
| 225 | 229 |
| 226 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ | 230 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ |
| OLD | NEW |