| 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 25 matching lines...) Expand all Loading... |
| 36 class MESSAGE_CENTER_EXPORT RichNotificationData { | 36 class MESSAGE_CENTER_EXPORT RichNotificationData { |
| 37 public: | 37 public: |
| 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 string16 expanded_message; | 45 string16 expanded_message; |
| 46 string16 context_message; | |
| 47 gfx::Image image; | 46 gfx::Image image; |
| 48 std::vector<NotificationItem> items; | 47 std::vector<NotificationItem> items; |
| 49 int progress; | 48 int progress; |
| 50 std::vector<ButtonInfo> buttons; | 49 std::vector<ButtonInfo> buttons; |
| 51 bool should_make_spoken_feedback_for_popup_updates; | 50 bool should_make_spoken_feedback_for_popup_updates; |
| 52 }; | 51 }; |
| 53 | 52 |
| 54 class MESSAGE_CENTER_EXPORT Notification { | 53 class MESSAGE_CENTER_EXPORT Notification { |
| 55 public: | 54 public: |
| 56 Notification(NotificationType type, | 55 Notification(NotificationType type, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 optional_fields_.timestamp = timestamp; | 95 optional_fields_.timestamp = timestamp; |
| 97 } | 96 } |
| 98 | 97 |
| 99 const string16& expanded_message() const { | 98 const string16& expanded_message() const { |
| 100 return optional_fields_.expanded_message; | 99 return optional_fields_.expanded_message; |
| 101 } | 100 } |
| 102 void set_expanded_message(const string16& expanded_message) { | 101 void set_expanded_message(const string16& expanded_message) { |
| 103 optional_fields_.expanded_message = expanded_message; | 102 optional_fields_.expanded_message = expanded_message; |
| 104 } | 103 } |
| 105 | 104 |
| 106 const string16& context_message() const { | |
| 107 return optional_fields_.context_message; | |
| 108 } | |
| 109 void set_context_message(const string16& context_message) { | |
| 110 optional_fields_.context_message = context_message; | |
| 111 } | |
| 112 | |
| 113 const std::vector<NotificationItem>& items() const { | 105 const std::vector<NotificationItem>& items() const { |
| 114 return optional_fields_.items; | 106 return optional_fields_.items; |
| 115 } | 107 } |
| 116 void set_items(const std::vector<NotificationItem>& items) { | 108 void set_items(const std::vector<NotificationItem>& items) { |
| 117 optional_fields_.items = items; | 109 optional_fields_.items = items; |
| 118 } | 110 } |
| 119 | 111 |
| 120 int progress() const { return optional_fields_.progress; } | 112 int progress() const { return optional_fields_.progress; } |
| 121 void set_progress(int progress) { optional_fields_.progress = progress; } | 113 void set_progress(int progress) { optional_fields_.progress = progress; } |
| 122 // End unpacked values. | 114 // End unpacked values. |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 bool is_expanded_; // True if this has been expanded in the message center. | 201 bool is_expanded_; // True if this has been expanded in the message center. |
| 210 | 202 |
| 211 // A proxy object that allows access back to the JavaScript object that | 203 // A proxy object that allows access back to the JavaScript object that |
| 212 // represents the notification, for firing events. | 204 // represents the notification, for firing events. |
| 213 scoped_refptr<NotificationDelegate> delegate_; | 205 scoped_refptr<NotificationDelegate> delegate_; |
| 214 }; | 206 }; |
| 215 | 207 |
| 216 } // namespace message_center | 208 } // namespace message_center |
| 217 | 209 |
| 218 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ | 210 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ |
| OLD | NEW |