| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_H_ | 5 #ifndef UI_MESSAGE_CENTER_NOTIFICATION_H_ |
| 6 #define UI_MESSAGE_CENTER_NOTIFICATION_H_ | 6 #define UI_MESSAGE_CENTER_NOTIFICATION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 RichNotificationData(); | 38 RichNotificationData(); |
| 39 RichNotificationData(const RichNotificationData& other); | 39 RichNotificationData(const RichNotificationData& other); |
| 40 ~RichNotificationData(); | 40 ~RichNotificationData(); |
| 41 | 41 |
| 42 int priority; | 42 int priority; |
| 43 bool never_timeout; | 43 bool never_timeout; |
| 44 base::Time timestamp; | 44 base::Time timestamp; |
| 45 base::string16 expanded_message; | 45 base::string16 expanded_message; |
| 46 base::string16 context_message; | 46 base::string16 context_message; |
| 47 gfx::Image image; | 47 gfx::Image image; |
| 48 gfx::Image small_image; |
| 48 std::vector<NotificationItem> items; | 49 std::vector<NotificationItem> items; |
| 49 int progress; | 50 int progress; |
| 50 std::vector<ButtonInfo> buttons; | 51 std::vector<ButtonInfo> buttons; |
| 51 bool should_make_spoken_feedback_for_popup_updates; | 52 bool should_make_spoken_feedback_for_popup_updates; |
| 52 bool clickable; | 53 bool clickable; |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 class MESSAGE_CENTER_EXPORT Notification { | 56 class MESSAGE_CENTER_EXPORT Notification { |
| 56 public: | 57 public: |
| 57 Notification(NotificationType type, | 58 Notification(NotificationType type, |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 void set_progress(int progress) { optional_fields_.progress = progress; } | 127 void set_progress(int progress) { optional_fields_.progress = progress; } |
| 127 // End unpacked values. | 128 // End unpacked values. |
| 128 | 129 |
| 129 // Images fetched asynchronously. | 130 // Images fetched asynchronously. |
| 130 const gfx::Image& icon() const { return icon_; } | 131 const gfx::Image& icon() const { return icon_; } |
| 131 void set_icon(const gfx::Image& icon) { icon_ = icon; } | 132 void set_icon(const gfx::Image& icon) { icon_ = icon; } |
| 132 | 133 |
| 133 const gfx::Image& image() const { return optional_fields_.image; } | 134 const gfx::Image& image() const { return optional_fields_.image; } |
| 134 void set_image(const gfx::Image& image) { optional_fields_.image = image; } | 135 void set_image(const gfx::Image& image) { optional_fields_.image = image; } |
| 135 | 136 |
| 137 const gfx::Image& small_image() const { return optional_fields_.small_image; } |
| 138 void set_small_image(const gfx::Image& image) { |
| 139 optional_fields_.small_image = image; |
| 140 } |
| 141 |
| 136 // Buttons, with icons fetched asynchronously. | 142 // Buttons, with icons fetched asynchronously. |
| 137 const std::vector<ButtonInfo>& buttons() const { | 143 const std::vector<ButtonInfo>& buttons() const { |
| 138 return optional_fields_.buttons; | 144 return optional_fields_.buttons; |
| 139 } | 145 } |
| 140 void set_buttons(const std::vector<ButtonInfo>& buttons) { | 146 void set_buttons(const std::vector<ButtonInfo>& buttons) { |
| 141 optional_fields_.buttons = buttons; | 147 optional_fields_.buttons = buttons; |
| 142 } | 148 } |
| 143 void SetButtonIcon(size_t index, const gfx::Image& icon); | 149 void SetButtonIcon(size_t index, const gfx::Image& icon); |
| 144 | 150 |
| 145 bool shown_as_popup() const { return shown_as_popup_; } | 151 bool shown_as_popup() const { return shown_as_popup_; } |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 bool is_expanded_; // True if this has been expanded in the message center. | 230 bool is_expanded_; // True if this has been expanded in the message center. |
| 225 | 231 |
| 226 // A proxy object that allows access back to the JavaScript object that | 232 // A proxy object that allows access back to the JavaScript object that |
| 227 // represents the notification, for firing events. | 233 // represents the notification, for firing events. |
| 228 scoped_refptr<NotificationDelegate> delegate_; | 234 scoped_refptr<NotificationDelegate> delegate_; |
| 229 }; | 235 }; |
| 230 | 236 |
| 231 } // namespace message_center | 237 } // namespace message_center |
| 232 | 238 |
| 233 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ | 239 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ |
| OLD | NEW |