| 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 <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 int unread_count; | 50 int unread_count; |
| 51 string16 button_one_title; | 51 string16 button_one_title; |
| 52 string16 button_two_title; | 52 string16 button_two_title; |
| 53 string16 expanded_message; | 53 string16 expanded_message; |
| 54 std::vector<NotificationItem> items; | 54 std::vector<NotificationItem> items; |
| 55 // End unpacked values | 55 // End unpacked values |
| 56 | 56 |
| 57 // Images fetched asynchronously | 57 // Images fetched asynchronously |
| 58 gfx::ImageSkia primary_icon; | 58 gfx::ImageSkia primary_icon; |
| 59 gfx::ImageSkia secondary_icon; | 59 gfx::ImageSkia secondary_icon; |
| 60 gfx::ImageSkia image; |
| 60 | 61 |
| 61 bool is_read; // True if this has been seen in the message center | 62 bool is_read; // True if this has been seen in the message center |
| 62 bool shown_as_popup; // True if this has been shown as a popup notification | 63 bool shown_as_popup; // True if this has been shown as a popup notification |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 typedef std::list<Notification> Notifications; | 66 typedef std::list<Notification> Notifications; |
| 66 | 67 |
| 67 class MESSAGE_CENTER_EXPORT Delegate { | 68 class MESSAGE_CENTER_EXPORT Delegate { |
| 68 public: | 69 public: |
| 69 Delegate() {} | 70 Delegate() {} |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 void SendRemoveNotificationsByExtension(const std::string& id); | 126 void SendRemoveNotificationsByExtension(const std::string& id); |
| 126 | 127 |
| 127 // Returns true if the notification exists and was updated. | 128 // Returns true if the notification exists and was updated. |
| 128 bool SetNotificationPrimaryIcon(const std::string& id, | 129 bool SetNotificationPrimaryIcon(const std::string& id, |
| 129 const gfx::ImageSkia& image); | 130 const gfx::ImageSkia& image); |
| 130 | 131 |
| 131 // Returns true if the notification exists and was updated. | 132 // Returns true if the notification exists and was updated. |
| 132 bool SetNotificationSecondaryIcon(const std::string& id, | 133 bool SetNotificationSecondaryIcon(const std::string& id, |
| 133 const gfx::ImageSkia& image); | 134 const gfx::ImageSkia& image); |
| 134 | 135 |
| 136 // Returns true if the notification exists and was updated. |
| 137 bool SetNotificationImage(const std::string& id, const gfx::ImageSkia& image); |
| 138 |
| 135 bool HasNotification(const std::string& id); | 139 bool HasNotification(const std::string& id); |
| 136 | 140 |
| 137 // Returns false if the first notification has been shown as a popup (which | 141 // Returns false if the first notification has been shown as a popup (which |
| 138 // means that all notifications have been shown). | 142 // means that all notifications have been shown). |
| 139 bool HasPopupNotifications(); | 143 bool HasPopupNotifications(); |
| 140 | 144 |
| 141 // Modifies |notifications| to contain the |kMaxVisiblePopupNotifications| | 145 // Modifies |notifications| to contain the |kMaxVisiblePopupNotifications| |
| 142 // least recent notifications that have not been shown as a popup. | 146 // least recent notifications that have not been shown as a popup. |
| 143 void GetPopupNotifications(Notifications* notifications); | 147 void GetPopupNotifications(Notifications* notifications); |
| 144 | 148 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 size_t unread_count_; | 200 size_t unread_count_; |
| 197 bool quiet_mode_; | 201 bool quiet_mode_; |
| 198 scoped_ptr<base::OneShotTimer<NotificationList> > quiet_mode_timer_; | 202 scoped_ptr<base::OneShotTimer<NotificationList> > quiet_mode_timer_; |
| 199 | 203 |
| 200 DISALLOW_COPY_AND_ASSIGN(NotificationList); | 204 DISALLOW_COPY_AND_ASSIGN(NotificationList); |
| 201 }; | 205 }; |
| 202 | 206 |
| 203 } // namespace message_center | 207 } // namespace message_center |
| 204 | 208 |
| 205 #endif // UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ | 209 #endif // UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_ |
| OLD | NEW |