| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // If paused, the amount of time that passed before pause. | 63 // If paused, the amount of time that passed before pause. |
| 64 base::TimeDelta passed_; | 64 base::TimeDelta passed_; |
| 65 | 65 |
| 66 // The time that the timer was last started. | 66 // The time that the timer was last started. |
| 67 base::Time start_time_; | 67 base::Time start_time_; |
| 68 | 68 |
| 69 // Callback recipient. | 69 // Callback recipient. |
| 70 base::WeakPtr<PopupTimersController> timer_controller_; | 70 base::WeakPtr<PopupTimersController> timer_controller_; |
| 71 | 71 |
| 72 // The actual timer. | 72 // The actual timer. |
| 73 scoped_ptr<base::OneShotTimer<PopupTimersController> > timer_; | 73 scoped_ptr<base::OneShotTimer> timer_; |
| 74 | 74 |
| 75 DISALLOW_COPY_AND_ASSIGN(PopupTimer); | 75 DISALLOW_COPY_AND_ASSIGN(PopupTimer); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 // A class that manages all the timers running for individual notification popup | 78 // A class that manages all the timers running for individual notification popup |
| 79 // windows. It supports weak pointers in order to allow safe callbacks when | 79 // windows. It supports weak pointers in order to allow safe callbacks when |
| 80 // timers expire. | 80 // timers expire. |
| 81 class MESSAGE_CENTER_EXPORT PopupTimersController | 81 class MESSAGE_CENTER_EXPORT PopupTimersController |
| 82 : public base::SupportsWeakPtr<PopupTimersController>, | 82 : public base::SupportsWeakPtr<PopupTimersController>, |
| 83 public MessageCenterObserver { | 83 public MessageCenterObserver { |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 size_t unread_count; | 216 size_t unread_count; |
| 217 }; | 217 }; |
| 218 | 218 |
| 219 void RemoveNotifications(bool by_user, const NotificationBlockers& blockers); | 219 void RemoveNotifications(bool by_user, const NotificationBlockers& blockers); |
| 220 void RemoveNotificationsForNotifierId(const NotifierId& notifier_id); | 220 void RemoveNotificationsForNotifierId(const NotifierId& notifier_id); |
| 221 | 221 |
| 222 scoped_ptr<NotificationList> notification_list_; | 222 scoped_ptr<NotificationList> notification_list_; |
| 223 NotificationCache notification_cache_; | 223 NotificationCache notification_cache_; |
| 224 base::ObserverList<MessageCenterObserver> observer_list_; | 224 base::ObserverList<MessageCenterObserver> observer_list_; |
| 225 scoped_ptr<internal::PopupTimersController> popup_timers_controller_; | 225 scoped_ptr<internal::PopupTimersController> popup_timers_controller_; |
| 226 scoped_ptr<base::OneShotTimer<MessageCenterImpl> > quiet_mode_timer_; | 226 scoped_ptr<base::OneShotTimer> quiet_mode_timer_; |
| 227 NotifierSettingsProvider* settings_provider_; | 227 NotifierSettingsProvider* settings_provider_; |
| 228 std::vector<NotificationBlocker*> blockers_; | 228 std::vector<NotificationBlocker*> blockers_; |
| 229 | 229 |
| 230 // Queue for the notifications to delay the addition/updates when the message | 230 // Queue for the notifications to delay the addition/updates when the message |
| 231 // center is visible. | 231 // center is visible. |
| 232 scoped_ptr<internal::ChangeQueue> notification_queue_; | 232 scoped_ptr<internal::ChangeQueue> notification_queue_; |
| 233 | 233 |
| 234 DISALLOW_COPY_AND_ASSIGN(MessageCenterImpl); | 234 DISALLOW_COPY_AND_ASSIGN(MessageCenterImpl); |
| 235 }; | 235 }; |
| 236 | 236 |
| 237 } // namespace message_center | 237 } // namespace message_center |
| 238 | 238 |
| 239 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ | 239 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ |
| OLD | NEW |