| 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 26 matching lines...) Expand all Loading... |
| 37 RichNotificationData(); | 37 RichNotificationData(); |
| 38 RichNotificationData(const RichNotificationData& other); | 38 RichNotificationData(const RichNotificationData& other); |
| 39 ~RichNotificationData(); | 39 ~RichNotificationData(); |
| 40 | 40 |
| 41 int priority; | 41 int priority; |
| 42 bool never_timeout; | 42 bool never_timeout; |
| 43 base::Time timestamp; | 43 base::Time timestamp; |
| 44 string16 expanded_message; | 44 string16 expanded_message; |
| 45 gfx::Image image; | 45 gfx::Image image; |
| 46 std::vector<NotificationItem> items; | 46 std::vector<NotificationItem> items; |
| 47 int progress; |
| 47 std::vector<ButtonInfo> buttons; | 48 std::vector<ButtonInfo> buttons; |
| 48 }; | 49 }; |
| 49 | 50 |
| 50 class MESSAGE_CENTER_EXPORT Notification { | 51 class MESSAGE_CENTER_EXPORT Notification { |
| 51 public: | 52 public: |
| 52 Notification(NotificationType type, | 53 Notification(NotificationType type, |
| 53 const std::string& id, | 54 const std::string& id, |
| 54 const string16& title, | 55 const string16& title, |
| 55 const string16& message, | 56 const string16& message, |
| 56 const gfx::Image& icon, | 57 const gfx::Image& icon, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 81 | 82 |
| 82 // Begin unpacked values from optional_fields. | 83 // Begin unpacked values from optional_fields. |
| 83 int priority() const { return optional_fields_.priority; } | 84 int priority() const { return optional_fields_.priority; } |
| 84 base::Time timestamp() const { return optional_fields_.timestamp; } | 85 base::Time timestamp() const { return optional_fields_.timestamp; } |
| 85 const string16& expanded_message() const { | 86 const string16& expanded_message() const { |
| 86 return optional_fields_.expanded_message; | 87 return optional_fields_.expanded_message; |
| 87 } | 88 } |
| 88 const std::vector<NotificationItem>& items() const { | 89 const std::vector<NotificationItem>& items() const { |
| 89 return optional_fields_.items; | 90 return optional_fields_.items; |
| 90 } | 91 } |
| 92 int progress() const { return optional_fields_.progress; } |
| 91 // End unpacked values. | 93 // End unpacked values. |
| 92 | 94 |
| 93 // Images fetched asynchronously. | 95 // Images fetched asynchronously. |
| 94 const gfx::Image& icon() const { return icon_; } | 96 const gfx::Image& icon() const { return icon_; } |
| 95 void set_icon(const gfx::Image& icon) { icon_ = icon; } | 97 void set_icon(const gfx::Image& icon) { icon_ = icon; } |
| 96 | 98 |
| 97 const gfx::Image& image() const { return optional_fields_.image; } | 99 const gfx::Image& image() const { return optional_fields_.image; } |
| 98 void set_image(const gfx::Image& image) { optional_fields_.image = image; } | 100 void set_image(const gfx::Image& image) { optional_fields_.image = image; } |
| 99 | 101 |
| 100 // Buttons, with icons fetched asynchronously. | 102 // Buttons, with icons fetched asynchronously. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 bool is_expanded_; // True if this has been expanded in the message center. | 170 bool is_expanded_; // True if this has been expanded in the message center. |
| 169 | 171 |
| 170 // A proxy object that allows access back to the JavaScript object that | 172 // A proxy object that allows access back to the JavaScript object that |
| 171 // represents the notification, for firing events. | 173 // represents the notification, for firing events. |
| 172 scoped_refptr<NotificationDelegate> delegate_; | 174 scoped_refptr<NotificationDelegate> delegate_; |
| 173 }; | 175 }; |
| 174 | 176 |
| 175 } // namespace message_center | 177 } // namespace message_center |
| 176 | 178 |
| 177 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ | 179 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ |
| OLD | NEW |