| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 message_center::Notification* FindVisibleNotificationById( | 53 message_center::Notification* FindVisibleNotificationById( |
| 54 const std::string& id) override; | 54 const std::string& id) override; |
| 55 const NotificationList::Notifications& GetVisibleNotifications() override; | 55 const NotificationList::Notifications& GetVisibleNotifications() override; |
| 56 NotificationList::PopupNotifications GetPopupNotifications() override; | 56 NotificationList::PopupNotifications GetPopupNotifications() override; |
| 57 void AddNotification(scoped_ptr<Notification> notification) override; | 57 void AddNotification(scoped_ptr<Notification> notification) override; |
| 58 void UpdateNotification(const std::string& old_id, | 58 void UpdateNotification(const std::string& old_id, |
| 59 scoped_ptr<Notification> new_notification) override; | 59 scoped_ptr<Notification> new_notification) override; |
| 60 void RemoveNotification(const std::string& id, bool by_user) override; | 60 void RemoveNotification(const std::string& id, bool by_user) override; |
| 61 void RemoveAllNotifications(bool by_user) override; | 61 void RemoveAllNotifications(bool by_user) override; |
| 62 void RemoveAllVisibleNotifications(bool by_user) override; | 62 void RemoveAllVisibleNotifications(bool by_user) override; |
| 63 void RemoveAllClosableNotifications(bool by_user) override; |
| 63 void SetNotificationIcon(const std::string& notification_id, | 64 void SetNotificationIcon(const std::string& notification_id, |
| 64 const gfx::Image& image) override; | 65 const gfx::Image& image) override; |
| 65 void SetNotificationImage(const std::string& notification_id, | 66 void SetNotificationImage(const std::string& notification_id, |
| 66 const gfx::Image& image) override; | 67 const gfx::Image& image) override; |
| 67 void SetNotificationButtonIcon(const std::string& notification_id, | 68 void SetNotificationButtonIcon(const std::string& notification_id, |
| 68 int button_index, | 69 int button_index, |
| 69 const gfx::Image& image) override; | 70 const gfx::Image& image) override; |
| 70 void DisableNotificationsByNotifier(const NotifierId& notifier_id) override; | 71 void DisableNotificationsByNotifier(const NotifierId& notifier_id) override; |
| 71 void ClickOnNotification(const std::string& id) override; | 72 void ClickOnNotification(const std::string& id) override; |
| 72 void ClickOnNotificationButton(const std::string& id, | 73 void ClickOnNotificationButton(const std::string& id, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 struct NotificationCache { | 110 struct NotificationCache { |
| 110 NotificationCache(); | 111 NotificationCache(); |
| 111 ~NotificationCache(); | 112 ~NotificationCache(); |
| 112 void Rebuild(const NotificationList::Notifications& notifications); | 113 void Rebuild(const NotificationList::Notifications& notifications); |
| 113 void RecountUnread(); | 114 void RecountUnread(); |
| 114 | 115 |
| 115 NotificationList::Notifications visible_notifications; | 116 NotificationList::Notifications visible_notifications; |
| 116 size_t unread_count; | 117 size_t unread_count; |
| 117 }; | 118 }; |
| 118 | 119 |
| 119 void RemoveNotifications(bool by_user, const NotificationBlockers& blockers); | 120 void RemoveNotifications( |
| 121 bool by_user, bool only_closable, const NotificationBlockers& blockers); |
| 120 void RemoveNotificationsForNotifierId(const NotifierId& notifier_id); | 122 void RemoveNotificationsForNotifierId(const NotifierId& notifier_id); |
| 121 | 123 |
| 122 scoped_ptr<NotificationList> notification_list_; | 124 scoped_ptr<NotificationList> notification_list_; |
| 123 NotificationCache notification_cache_; | 125 NotificationCache notification_cache_; |
| 124 base::ObserverList<MessageCenterObserver> observer_list_; | 126 base::ObserverList<MessageCenterObserver> observer_list_; |
| 125 scoped_ptr<PopupTimersController> popup_timers_controller_; | 127 scoped_ptr<PopupTimersController> popup_timers_controller_; |
| 126 scoped_ptr<base::OneShotTimer> quiet_mode_timer_; | 128 scoped_ptr<base::OneShotTimer> quiet_mode_timer_; |
| 127 NotifierSettingsProvider* settings_provider_; | 129 NotifierSettingsProvider* settings_provider_; |
| 128 std::vector<NotificationBlocker*> blockers_; | 130 std::vector<NotificationBlocker*> blockers_; |
| 129 | 131 |
| 130 // Queue for the notifications to delay the addition/updates when the message | 132 // Queue for the notifications to delay the addition/updates when the message |
| 131 // center is visible. | 133 // center is visible. |
| 132 scoped_ptr<internal::ChangeQueue> notification_queue_; | 134 scoped_ptr<internal::ChangeQueue> notification_queue_; |
| 133 | 135 |
| 134 DISALLOW_COPY_AND_ASSIGN(MessageCenterImpl); | 136 DISALLOW_COPY_AND_ASSIGN(MessageCenterImpl); |
| 135 }; | 137 }; |
| 136 | 138 |
| 137 } // namespace message_center | 139 } // namespace message_center |
| 138 | 140 |
| 139 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ | 141 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ |
| OLD | NEW |