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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 bool never_timeout; | 43 bool never_timeout; |
44 base::Time timestamp; | 44 base::Time timestamp; |
45 base::string16 context_message; | 45 base::string16 context_message; |
46 gfx::Image image; | 46 gfx::Image image; |
47 gfx::Image small_image; | 47 gfx::Image small_image; |
48 std::vector<NotificationItem> items; | 48 std::vector<NotificationItem> items; |
49 int progress; | 49 int progress; |
50 std::vector<ButtonInfo> buttons; | 50 std::vector<ButtonInfo> buttons; |
51 bool should_make_spoken_feedback_for_popup_updates; | 51 bool should_make_spoken_feedback_for_popup_updates; |
52 bool clickable; | 52 bool clickable; |
| 53 bool silent; |
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, |
58 const std::string& id, | 59 const std::string& id, |
59 const base::string16& title, | 60 const base::string16& title, |
60 const base::string16& message, | 61 const base::string16& message, |
61 const gfx::Image& icon, | 62 const gfx::Image& icon, |
62 const base::string16& display_source, | 63 const base::string16& display_source, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 const NotifierId& notifier_id() const { return notifier_id_; } | 97 const NotifierId& notifier_id() const { return notifier_id_; } |
97 | 98 |
98 void set_profile_id(const std::string& profile_id) { | 99 void set_profile_id(const std::string& profile_id) { |
99 notifier_id_.profile_id = profile_id; | 100 notifier_id_.profile_id = profile_id; |
100 } | 101 } |
101 | 102 |
102 // Begin unpacked values from optional_fields. | 103 // Begin unpacked values from optional_fields. |
103 int priority() const { return optional_fields_.priority; } | 104 int priority() const { return optional_fields_.priority; } |
104 void set_priority(int priority) { optional_fields_.priority = priority; } | 105 void set_priority(int priority) { optional_fields_.priority = priority; } |
105 | 106 |
| 107 // This property currently has no effect on non-Android platforms. |
| 108 bool silent() const { return optional_fields_.silent; } |
| 109 void set_silent(bool silent) { optional_fields_.silent = silent; } |
| 110 |
106 base::Time timestamp() const { return optional_fields_.timestamp; } | 111 base::Time timestamp() const { return optional_fields_.timestamp; } |
107 void set_timestamp(const base::Time& timestamp) { | 112 void set_timestamp(const base::Time& timestamp) { |
108 optional_fields_.timestamp = timestamp; | 113 optional_fields_.timestamp = timestamp; |
109 } | 114 } |
110 | 115 |
111 const base::string16& context_message() const { | 116 const base::string16& context_message() const { |
112 return optional_fields_.context_message; | 117 return optional_fields_.context_message; |
113 } | 118 } |
114 void set_context_message(const base::string16& context_message) { | 119 void set_context_message(const base::string16& context_message) { |
115 optional_fields_.context_message = context_message; | 120 optional_fields_.context_message = context_message; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 bool is_read_; // True if this has been seen in the message center. | 230 bool is_read_; // True if this has been seen in the message center. |
226 | 231 |
227 // 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 |
228 // represents the notification, for firing events. | 233 // represents the notification, for firing events. |
229 scoped_refptr<NotificationDelegate> delegate_; | 234 scoped_refptr<NotificationDelegate> delegate_; |
230 }; | 235 }; |
231 | 236 |
232 } // namespace message_center | 237 } // namespace message_center |
233 | 238 |
234 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ | 239 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ |
OLD | NEW |