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 bool silent() const { return optional_fields_.silent; } | |
dewittj
2015/02/27 19:09:31
Nit: comment that this field has no effect on non-
Peter Beverloo
2015/03/02 19:04:35
Done.
| |
108 void set_silent(bool silent) { optional_fields_.silent = silent; } | |
109 | |
106 base::Time timestamp() const { return optional_fields_.timestamp; } | 110 base::Time timestamp() const { return optional_fields_.timestamp; } |
107 void set_timestamp(const base::Time& timestamp) { | 111 void set_timestamp(const base::Time& timestamp) { |
108 optional_fields_.timestamp = timestamp; | 112 optional_fields_.timestamp = timestamp; |
109 } | 113 } |
110 | 114 |
111 const base::string16& context_message() const { | 115 const base::string16& context_message() const { |
112 return optional_fields_.context_message; | 116 return optional_fields_.context_message; |
113 } | 117 } |
114 void set_context_message(const base::string16& context_message) { | 118 void set_context_message(const base::string16& context_message) { |
115 optional_fields_.context_message = context_message; | 119 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. | 229 bool is_read_; // True if this has been seen in the message center. |
226 | 230 |
227 // A proxy object that allows access back to the JavaScript object that | 231 // A proxy object that allows access back to the JavaScript object that |
228 // represents the notification, for firing events. | 232 // represents the notification, for firing events. |
229 scoped_refptr<NotificationDelegate> delegate_; | 233 scoped_refptr<NotificationDelegate> delegate_; |
230 }; | 234 }; |
231 | 235 |
232 } // namespace message_center | 236 } // namespace message_center |
233 | 237 |
234 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ | 238 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ |
OLD | NEW |