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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
93 // Basic operations of notification: add/remove/update. | 93 // Basic operations of notification: add/remove/update. |
94 | 94 |
95 // Adds a new notification. | 95 // Adds a new notification. |
96 virtual void AddNotification(scoped_ptr<Notification> notification) = 0; | 96 virtual void AddNotification(scoped_ptr<Notification> notification) = 0; |
97 | 97 |
98 // Updates an existing notification with id = old_id and set its id to new_id. | 98 // Updates an existing notification with id = old_id and set its id to new_id. |
99 virtual void UpdateNotification( | 99 virtual void UpdateNotification( |
100 const std::string& old_id, | 100 const std::string& old_id, |
101 scoped_ptr<Notification> new_notification) = 0; | 101 scoped_ptr<Notification> new_notification) = 0; |
102 | 102 |
103 // Removes an existing notification. | 103 // Removes an existing notification. |
dewittj
2016/02/03 19:31:37
All the remove methods should have their own comme
yoshiki
2016/02/07 17:49:41
I think RemoveNotification can be kept as an indep
| |
104 virtual void RemoveNotification(const std::string& id, bool by_user) = 0; | 104 virtual void RemoveNotification(const std::string& id, bool by_user) = 0; |
105 virtual void RemoveAllNotifications(bool by_user) = 0; | 105 virtual void RemoveAllNotifications(bool by_user) = 0; |
106 virtual void RemoveAllVisibleNotifications(bool by_user) = 0; | 106 virtual void RemoveAllVisibleNotifications(bool by_user) = 0; |
107 virtual void RemoveAllClosableNotifications(bool by_user) = 0; | |
107 | 108 |
108 // Sets the icon image. Icon appears at the top-left of the notification. | 109 // Sets the icon image. Icon appears at the top-left of the notification. |
109 virtual void SetNotificationIcon(const std::string& notification_id, | 110 virtual void SetNotificationIcon(const std::string& notification_id, |
110 const gfx::Image& image) = 0; | 111 const gfx::Image& image) = 0; |
111 | 112 |
112 // Sets the large image for the notifications of type == TYPE_IMAGE. Specified | 113 // Sets the large image for the notifications of type == TYPE_IMAGE. Specified |
113 // image will appear below of the notification. | 114 // image will appear below of the notification. |
114 virtual void SetNotificationImage(const std::string& notification_id, | 115 virtual void SetNotificationImage(const std::string& notification_id, |
115 const gfx::Image& image) = 0; | 116 const gfx::Image& image) = 0; |
116 | 117 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
205 // Note carefully: this may break the layout of message center. Shouldn't use | 206 // Note carefully: this may break the layout of message center. Shouldn't use |
206 // this method if the update changes its notification size. | 207 // this method if the update changes its notification size. |
207 virtual void ForceNotificationFlush(const std::string& id) {} | 208 virtual void ForceNotificationFlush(const std::string& id) {} |
208 | 209 |
209 DISALLOW_COPY_AND_ASSIGN(MessageCenter); | 210 DISALLOW_COPY_AND_ASSIGN(MessageCenter); |
210 }; | 211 }; |
211 | 212 |
212 } // namespace message_center | 213 } // namespace message_center |
213 | 214 |
214 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ | 215 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ |
OLD | NEW |