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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // |mark_notification_as_read|, if false, will unset the read bit on a | 120 // |mark_notification_as_read|, if false, will unset the read bit on a |
121 // notification, increasing the unread count of the center. | 121 // notification, increasing the unread count of the center. |
122 virtual void MarkSinglePopupAsShown(const std::string& id, | 122 virtual void MarkSinglePopupAsShown(const std::string& id, |
123 bool mark_notification_as_read) = 0; | 123 bool mark_notification_as_read) = 0; |
124 | 124 |
125 // This should be called by UI classes when a notification is first displayed | 125 // This should be called by UI classes when a notification is first displayed |
126 // to the user, in order to decrement the unread_count for the tray, and to | 126 // to the user, in order to decrement the unread_count for the tray, and to |
127 // notify observers that the notification is visible. | 127 // notify observers that the notification is visible. |
128 virtual void DisplayedNotification(const std::string& id) = 0; | 128 virtual void DisplayedNotification(const std::string& id) = 0; |
129 | 129 |
| 130 // This should be called by UI classes when a notification is popped up |
| 131 // to the user, in order to decrement the unread_count for the tray, and to |
| 132 // notify observers that the notification is popped up. |
| 133 // This behavior is a superset of DisplayNotification behavior. |
| 134 virtual void PoppedUpNotification(const std::string& id) = 0; |
| 135 |
130 // Setter/getter of notifier settings provider. This will be a weak reference. | 136 // Setter/getter of notifier settings provider. This will be a weak reference. |
131 // This should be set at the initialization process. The getter may return | 137 // This should be set at the initialization process. The getter may return |
132 // NULL for tests. | 138 // NULL for tests. |
133 virtual void SetNotifierSettingsProvider( | 139 virtual void SetNotifierSettingsProvider( |
134 NotifierSettingsProvider* provider) = 0; | 140 NotifierSettingsProvider* provider) = 0; |
135 virtual NotifierSettingsProvider* GetNotifierSettingsProvider() = 0; | 141 virtual NotifierSettingsProvider* GetNotifierSettingsProvider() = 0; |
136 | 142 |
137 // This can be called to change the quiet mode state (without a timeout). | 143 // This can be called to change the quiet mode state (without a timeout). |
138 virtual void SetQuietMode(bool in_quiet_mode) = 0; | 144 virtual void SetQuietMode(bool in_quiet_mode) = 0; |
139 | 145 |
(...skipping 23 matching lines...) Expand all Loading... |
163 MessageCenter(); | 169 MessageCenter(); |
164 virtual ~MessageCenter(); | 170 virtual ~MessageCenter(); |
165 | 171 |
166 private: | 172 private: |
167 DISALLOW_COPY_AND_ASSIGN(MessageCenter); | 173 DISALLOW_COPY_AND_ASSIGN(MessageCenter); |
168 }; | 174 }; |
169 | 175 |
170 } // namespace message_center | 176 } // namespace message_center |
171 | 177 |
172 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ | 178 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ |
OLD | NEW |