OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_H_ | 5 #ifndef UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ |
6 #define UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ | 6 #define UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
132 void SetNotificationImage(const std::string& notification_id, | 132 void SetNotificationImage(const std::string& notification_id, |
133 const gfx::ImageSkia& image); | 133 const gfx::ImageSkia& image); |
134 | 134 |
135 void SetNotificationButtonIcon(const std::string& notification_id, | 135 void SetNotificationButtonIcon(const std::string& notification_id, |
136 int button_index, | 136 int button_index, |
137 const gfx::ImageSkia& image); | 137 const gfx::ImageSkia& image); |
138 | 138 |
139 NotificationList* notification_list() { return notification_list_.get(); } | 139 NotificationList* notification_list() { return notification_list_.get(); } |
140 bool quiet_mode() const { return notification_list_->quiet_mode(); } | 140 bool quiet_mode() const { return notification_list_->quiet_mode(); } |
141 | 141 |
142 // Overridden from NotificationList::Delegate. | 142 // Overridden from NotificationList::Delegate: |
143 virtual void SendRemoveNotification(const std::string& id, | 143 virtual void SendRemoveNotification(const std::string& id, |
144 bool by_user) OVERRIDE; | 144 bool by_user) OVERRIDE; |
145 virtual void SendRemoveAllNotifications(bool by_user) OVERRIDE; | 145 virtual void SendRemoveAllNotifications(bool by_user) OVERRIDE; |
146 virtual void DisableNotificationByExtension(const std::string& id) OVERRIDE; | 146 virtual void DisableNotificationByExtension(const std::string& id) OVERRIDE; |
147 virtual void DisableNotificationByUrl(const std::string& id) OVERRIDE; | 147 virtual void DisableNotificationByUrl(const std::string& id) OVERRIDE; |
148 virtual void ShowNotificationSettings(const std::string& id) OVERRIDE; | 148 virtual void ShowNotificationSettings(const std::string& id) OVERRIDE; |
149 virtual void ShowNotificationSettingsDialog(gfx::NativeView context) OVERRIDE; | 149 virtual void ShowNotificationSettingsDialog(gfx::NativeView context) OVERRIDE; |
150 virtual void OnNotificationClicked(const std::string& id) OVERRIDE; | 150 virtual void OnNotificationClicked(const std::string& id) OVERRIDE; |
151 virtual void OnQuietModeChanged(bool quiet_mode) OVERRIDE; | |
152 virtual void OnButtonClicked(const std::string& id, int button_index) | 151 virtual void OnButtonClicked(const std::string& id, int button_index) |
153 OVERRIDE; | 152 OVERRIDE; |
154 virtual NotificationList* GetNotificationList() OVERRIDE; | 153 virtual void OnExpand(const std::string& id) OVERRIDE; |
154 virtual void OnQuietModeChanged(bool quiet_mode) OVERRIDE; | |
dharcourt
2013/03/01 10:17:31
GetNotificationList() was removed from MessageCent
| |
155 | 155 |
156 private: | 156 private: |
157 // Calls OnMessageCenterChanged on each observer. | 157 // Calls OnMessageCenterChanged on each observer. |
158 void NotifyMessageCenterChanged(bool new_notification); | 158 void NotifyMessageCenterChanged(bool new_notification); |
159 | 159 |
160 scoped_ptr<NotificationList> notification_list_; | 160 scoped_ptr<NotificationList> notification_list_; |
161 ObserverList<Observer> observer_list_; | 161 ObserverList<Observer> observer_list_; |
162 Delegate* delegate_; | 162 Delegate* delegate_; |
163 | 163 |
164 DISALLOW_COPY_AND_ASSIGN(MessageCenter); | 164 DISALLOW_COPY_AND_ASSIGN(MessageCenter); |
165 }; | 165 }; |
166 | 166 |
167 } // namespace message_center | 167 } // namespace message_center |
168 | 168 |
169 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ | 169 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ |
OLD | NEW |