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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 explicit NotificationList(); | 52 explicit NotificationList(); |
53 virtual ~NotificationList(); | 53 virtual ~NotificationList(); |
54 | 54 |
55 // Affects whether or not a message has been "read". Collects the set of | 55 // Affects whether or not a message has been "read". Collects the set of |
56 // ids whose state have changed and set to |udpated_ids|. NULL if updated | 56 // ids whose state have changed and set to |udpated_ids|. NULL if updated |
57 // ids don't matter. | 57 // ids don't matter. |
58 void SetMessageCenterVisible(bool visible, | 58 void SetMessageCenterVisible(bool visible, |
59 std::set<std::string>* updated_ids); | 59 std::set<std::string>* updated_ids); |
60 | 60 |
61 void AddNotification(NotificationType type, | 61 void AddNotification(scoped_ptr<Notification> notification); |
62 const std::string& id, | |
63 const string16& title, | |
64 const string16& message, | |
65 const string16& display_source, | |
66 const std::string& extension_id, | |
67 const base::DictionaryValue* optional_fields, | |
68 NotificationDelegate* delegate); | |
69 | 62 |
70 void UpdateNotificationMessage(const std::string& old_id, | 63 void UpdateNotificationMessage(const std::string& old_id, |
71 const std::string& new_id, | 64 scoped_ptr<Notification> new_notification); |
72 const string16& title, | |
73 const string16& message, | |
74 const base::DictionaryValue* optional_fields, | |
75 NotificationDelegate* delegate); | |
76 | 65 |
77 void RemoveNotification(const std::string& id); | 66 void RemoveNotification(const std::string& id); |
78 | 67 |
79 void RemoveAllNotifications(); | 68 void RemoveAllNotifications(); |
80 | 69 |
81 Notifications GetNotificationsBySource(const std::string& id); | 70 Notifications GetNotificationsBySource(const std::string& id); |
82 Notifications GetNotificationsByExtension(const std::string& id); | 71 Notifications GetNotificationsByExtension(const std::string& id); |
83 | 72 |
84 // Returns true if the notification exists and was updated. | 73 // Returns true if the notification exists and was updated. |
85 bool SetNotificationIcon(const std::string& notification_id, | 74 bool SetNotificationIcon(const std::string& notification_id, |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 size_t unread_count_; | 145 size_t unread_count_; |
157 bool quiet_mode_; | 146 bool quiet_mode_; |
158 scoped_ptr<base::OneShotTimer<NotificationList> > quiet_mode_timer_; | 147 scoped_ptr<base::OneShotTimer<NotificationList> > quiet_mode_timer_; |
159 | 148 |
160 DISALLOW_COPY_AND_ASSIGN(NotificationList); | 149 DISALLOW_COPY_AND_ASSIGN(NotificationList); |
161 }; | 150 }; |
162 | 151 |
163 } // namespace message_center | 152 } // namespace message_center |
164 | 153 |
165 #endif // UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ | 154 #endif // UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ |
OLD | NEW |