| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 // NotificationBlocker::Observer overrides: | 190 // NotificationBlocker::Observer overrides: |
| 191 virtual void OnBlockingStateChanged(NotificationBlocker* blocker) OVERRIDE; | 191 virtual void OnBlockingStateChanged(NotificationBlocker* blocker) OVERRIDE; |
| 192 | 192 |
| 193 protected: | 193 protected: |
| 194 virtual void DisableTimersForTest() OVERRIDE; | 194 virtual void DisableTimersForTest() OVERRIDE; |
| 195 | 195 |
| 196 private: | 196 private: |
| 197 struct NotificationCache { | 197 struct NotificationCache { |
| 198 NotificationCache(); | 198 NotificationCache(); |
| 199 ~NotificationCache(); | 199 ~NotificationCache(); |
| 200 void Rebuild(const NotificationList::Notifications& notificaitons); | 200 void Rebuild(const NotificationList::Notifications& notifications); |
| 201 void RecountUnread(); | 201 void RecountUnread(); |
| 202 | 202 |
| 203 NotificationList::Notifications visible_notifications; | 203 NotificationList::Notifications visible_notifications; |
| 204 size_t unread_count; | 204 size_t unread_count; |
| 205 }; | 205 }; |
| 206 | 206 |
| 207 void RemoveNotifications(bool by_user, const NotificationBlockers& blockers); | 207 void RemoveNotifications(bool by_user, const NotificationBlockers& blockers); |
| 208 | 208 |
| 209 scoped_ptr<NotificationList> notification_list_; | 209 scoped_ptr<NotificationList> notification_list_; |
| 210 NotificationCache notification_cache_; | 210 NotificationCache notification_cache_; |
| 211 ObserverList<MessageCenterObserver> observer_list_; | 211 ObserverList<MessageCenterObserver> observer_list_; |
| 212 scoped_ptr<internal::PopupTimersController> popup_timers_controller_; | 212 scoped_ptr<internal::PopupTimersController> popup_timers_controller_; |
| 213 scoped_ptr<base::OneShotTimer<MessageCenterImpl> > quiet_mode_timer_; | 213 scoped_ptr<base::OneShotTimer<MessageCenterImpl> > quiet_mode_timer_; |
| 214 NotifierSettingsProvider* settings_provider_; | 214 NotifierSettingsProvider* settings_provider_; |
| 215 std::vector<NotificationBlocker*> blockers_; | 215 std::vector<NotificationBlocker*> blockers_; |
| 216 | 216 |
| 217 // Queue for the notifications to delay the addition/updates when the message | 217 // Queue for the notifications to delay the addition/updates when the message |
| 218 // center is visible. | 218 // center is visible. |
| 219 scoped_ptr<internal::ChangeQueue> notification_queue_; | 219 scoped_ptr<internal::ChangeQueue> notification_queue_; |
| 220 | 220 |
| 221 DISALLOW_COPY_AND_ASSIGN(MessageCenterImpl); | 221 DISALLOW_COPY_AND_ASSIGN(MessageCenterImpl); |
| 222 }; | 222 }; |
| 223 | 223 |
| 224 } // namespace message_center | 224 } // namespace message_center |
| 225 | 225 |
| 226 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ | 226 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ |
| OLD | NEW |