| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 bool IsQuietMode() const override; | 51 bool IsQuietMode() const override; |
| 52 bool HasClickedListener(const std::string& id) override; | 52 bool HasClickedListener(const std::string& id) override; |
| 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, RemoveType type) override; |
| 62 void RemoveAllVisibleNotifications(bool by_user) override; | |
| 63 void SetNotificationIcon(const std::string& notification_id, | 62 void SetNotificationIcon(const std::string& notification_id, |
| 64 const gfx::Image& image) override; | 63 const gfx::Image& image) override; |
| 65 void SetNotificationImage(const std::string& notification_id, | 64 void SetNotificationImage(const std::string& notification_id, |
| 66 const gfx::Image& image) override; | 65 const gfx::Image& image) override; |
| 67 void SetNotificationButtonIcon(const std::string& notification_id, | 66 void SetNotificationButtonIcon(const std::string& notification_id, |
| 68 int button_index, | 67 int button_index, |
| 69 const gfx::Image& image) override; | 68 const gfx::Image& image) override; |
| 70 void DisableNotificationsByNotifier(const NotifierId& notifier_id) override; | 69 void DisableNotificationsByNotifier(const NotifierId& notifier_id) override; |
| 71 void ClickOnNotification(const std::string& id) override; | 70 void ClickOnNotification(const std::string& id) override; |
| 72 void ClickOnNotificationButton(const std::string& id, | 71 void ClickOnNotificationButton(const std::string& id, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 struct NotificationCache { | 108 struct NotificationCache { |
| 110 NotificationCache(); | 109 NotificationCache(); |
| 111 ~NotificationCache(); | 110 ~NotificationCache(); |
| 112 void Rebuild(const NotificationList::Notifications& notifications); | 111 void Rebuild(const NotificationList::Notifications& notifications); |
| 113 void RecountUnread(); | 112 void RecountUnread(); |
| 114 | 113 |
| 115 NotificationList::Notifications visible_notifications; | 114 NotificationList::Notifications visible_notifications; |
| 116 size_t unread_count; | 115 size_t unread_count; |
| 117 }; | 116 }; |
| 118 | 117 |
| 119 void RemoveNotifications(bool by_user, const NotificationBlockers& blockers); | |
| 120 void RemoveNotificationsForNotifierId(const NotifierId& notifier_id); | 118 void RemoveNotificationsForNotifierId(const NotifierId& notifier_id); |
| 121 | 119 |
| 122 scoped_ptr<NotificationList> notification_list_; | 120 scoped_ptr<NotificationList> notification_list_; |
| 123 NotificationCache notification_cache_; | 121 NotificationCache notification_cache_; |
| 124 base::ObserverList<MessageCenterObserver> observer_list_; | 122 base::ObserverList<MessageCenterObserver> observer_list_; |
| 125 scoped_ptr<PopupTimersController> popup_timers_controller_; | 123 scoped_ptr<PopupTimersController> popup_timers_controller_; |
| 126 scoped_ptr<base::OneShotTimer> quiet_mode_timer_; | 124 scoped_ptr<base::OneShotTimer> quiet_mode_timer_; |
| 127 NotifierSettingsProvider* settings_provider_; | 125 NotifierSettingsProvider* settings_provider_; |
| 128 std::vector<NotificationBlocker*> blockers_; | 126 std::vector<NotificationBlocker*> blockers_; |
| 129 | 127 |
| 130 // Queue for the notifications to delay the addition/updates when the message | 128 // Queue for the notifications to delay the addition/updates when the message |
| 131 // center is visible. | 129 // center is visible. |
| 132 scoped_ptr<internal::ChangeQueue> notification_queue_; | 130 scoped_ptr<internal::ChangeQueue> notification_queue_; |
| 133 | 131 |
| 134 DISALLOW_COPY_AND_ASSIGN(MessageCenterImpl); | 132 DISALLOW_COPY_AND_ASSIGN(MessageCenterImpl); |
| 135 }; | 133 }; |
| 136 | 134 |
| 137 } // namespace message_center | 135 } // namespace message_center |
| 138 | 136 |
| 139 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ | 137 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ |
| OLD | NEW |