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_NOTIFICATION_LIST_H_ | 5 #ifndef UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ |
6 #define UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ | 6 #define UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // Notification Center. | 42 // Notification Center. |
43 typedef std::set<Notification*, ComparePriorityTimestampSerial> Notifications; | 43 typedef std::set<Notification*, ComparePriorityTimestampSerial> Notifications; |
44 | 44 |
45 // Auto-sorted set used to return the Notifications to be shown as popup | 45 // Auto-sorted set used to return the Notifications to be shown as popup |
46 // toasts. | 46 // toasts. |
47 typedef std::set<Notification*, CompareTimestampSerial> PopupNotifications; | 47 typedef std::set<Notification*, CompareTimestampSerial> PopupNotifications; |
48 | 48 |
49 explicit NotificationList(); | 49 explicit NotificationList(); |
50 virtual ~NotificationList(); | 50 virtual ~NotificationList(); |
51 | 51 |
52 // Affects whether or not a message has been "read". | 52 // Affects whether or not a message has been "read". Collects the set of |
53 void SetMessageCenterVisible(bool visible); | 53 // ids whose state have changed and set to |udpated_ids|. NULL if updated |
| 54 // ids don't matter. |
| 55 void SetMessageCenterVisible(bool visible, |
| 56 std::set<std::string>* updated_ids); |
54 | 57 |
55 void AddNotification(NotificationType type, | 58 void AddNotification(NotificationType type, |
56 const std::string& id, | 59 const std::string& id, |
57 const string16& title, | 60 const string16& title, |
58 const string16& message, | 61 const string16& message, |
59 const string16& display_source, | 62 const string16& display_source, |
60 const std::string& extension_id, | 63 const std::string& extension_id, |
61 const base::DictionaryValue* optional_fields); | 64 const base::DictionaryValue* optional_fields); |
62 | 65 |
63 void UpdateNotificationMessage(const std::string& old_id, | 66 void UpdateNotificationMessage(const std::string& old_id, |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 size_t unread_count_; | 149 size_t unread_count_; |
147 bool quiet_mode_; | 150 bool quiet_mode_; |
148 scoped_ptr<base::OneShotTimer<NotificationList> > quiet_mode_timer_; | 151 scoped_ptr<base::OneShotTimer<NotificationList> > quiet_mode_timer_; |
149 | 152 |
150 DISALLOW_COPY_AND_ASSIGN(NotificationList); | 153 DISALLOW_COPY_AND_ASSIGN(NotificationList); |
151 }; | 154 }; |
152 | 155 |
153 } // namespace message_center | 156 } // namespace message_center |
154 | 157 |
155 #endif // UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ | 158 #endif // UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ |
OLD | NEW |