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 <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "ui/message_center/message_center_export.h" | 14 #include "ui/message_center/message_center_export.h" |
15 #include "ui/message_center/message_center_types.h" | 15 #include "ui/message_center/message_center_types.h" |
16 #include "ui/message_center/notification_list.h" | 16 #include "ui/message_center/notification_list.h" |
17 | 17 |
18 class DownloadNotification; | 18 class DownloadNotification; |
19 class DownloadNotificationTestBase; | 19 class DownloadNotificationTestBase; |
20 | 20 |
21 namespace base { | |
22 class DictionaryValue; | |
23 } | |
24 | |
25 // Interface to manage the NotificationList. The client (e.g. Chrome) calls | 21 // Interface to manage the NotificationList. The client (e.g. Chrome) calls |
26 // [Add|Remove|Update]Notification to create and update notifications in the | 22 // [Add|Remove|Update]Notification to create and update notifications in the |
27 // list. It also sends those changes to its observers when a notification | 23 // list. It also sends those changes to its observers when a notification |
28 // is shown, closed, or clicked on. | 24 // is shown, closed, or clicked on. |
29 // | 25 // |
30 // MessageCenter is agnostic of profiles; it uses the string returned by | 26 // MessageCenter is agnostic of profiles; it uses the string returned by |
31 // message_center::Notification::id() to uniquely identify a notification. It is | 27 // message_center::Notification::id() to uniquely identify a notification. It is |
32 // the caller's responsibility to formulate the id so that 2 different | 28 // the caller's responsibility to formulate the id so that 2 different |
33 // notification should have different ids. For example, if the caller supports | 29 // notification should have different ids. For example, if the caller supports |
34 // multiple profiles, then caller should encode both profile characteristics and | 30 // multiple profiles, then caller should encode both profile characteristics and |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 // Note carefully: this may break the layout of message center. Shouldn't use | 211 // Note carefully: this may break the layout of message center. Shouldn't use |
216 // this method if the update changes its notification size. | 212 // this method if the update changes its notification size. |
217 virtual void ForceNotificationFlush(const std::string& id) {} | 213 virtual void ForceNotificationFlush(const std::string& id) {} |
218 | 214 |
219 DISALLOW_COPY_AND_ASSIGN(MessageCenter); | 215 DISALLOW_COPY_AND_ASSIGN(MessageCenter); |
220 }; | 216 }; |
221 | 217 |
222 } // namespace message_center | 218 } // namespace message_center |
223 | 219 |
224 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ | 220 #endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_H_ |
OLD | NEW |