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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 bool never_timeout; | 46 bool never_timeout; |
47 base::Time timestamp; | 47 base::Time timestamp; |
48 base::string16 context_message; | 48 base::string16 context_message; |
49 gfx::Image image; | 49 gfx::Image image; |
50 gfx::Image small_image; | 50 gfx::Image small_image; |
51 std::vector<NotificationItem> items; | 51 std::vector<NotificationItem> items; |
52 int progress; | 52 int progress; |
53 std::vector<ButtonInfo> buttons; | 53 std::vector<ButtonInfo> buttons; |
54 bool should_make_spoken_feedback_for_popup_updates; | 54 bool should_make_spoken_feedback_for_popup_updates; |
55 bool clickable; | 55 bool clickable; |
56 bool pinned; | |
dewittj
2016/02/10 00:03:15
please document this field somewhere, I realize th
yoshiki
2016/02/12 23:11:36
Done.
| |
56 std::vector<int> vibration_pattern; | 57 std::vector<int> vibration_pattern; |
57 bool silent; | 58 bool silent; |
58 }; | 59 }; |
59 | 60 |
60 class MESSAGE_CENTER_EXPORT Notification { | 61 class MESSAGE_CENTER_EXPORT Notification { |
61 public: | 62 public: |
62 Notification(NotificationType type, | 63 Notification(NotificationType type, |
63 const std::string& id, | 64 const std::string& id, |
64 const base::string16& title, | 65 const base::string16& title, |
65 const base::string16& message, | 66 const base::string16& message, |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
199 bool never_timeout() const { return optional_fields_.never_timeout; } | 200 bool never_timeout() const { return optional_fields_.never_timeout; } |
200 void set_never_timeout(bool never_timeout) { | 201 void set_never_timeout(bool never_timeout) { |
201 optional_fields_.never_timeout = never_timeout; | 202 optional_fields_.never_timeout = never_timeout; |
202 } | 203 } |
203 | 204 |
204 bool clickable() const { return optional_fields_.clickable; } | 205 bool clickable() const { return optional_fields_.clickable; } |
205 void set_clickable(bool clickable) { | 206 void set_clickable(bool clickable) { |
206 optional_fields_.clickable = clickable; | 207 optional_fields_.clickable = clickable; |
207 } | 208 } |
208 | 209 |
210 bool pinned() const { return optional_fields_.pinned; } | |
Miguel Garcia
2016/02/10 10:00:54
Would it make sense to ifdef these methods of CrOs
yoshiki
2016/02/12 23:11:36
It is a chromeos only feature. Done.
| |
211 void set_pinned(bool pinned) { optional_fields_.pinned = pinned; } | |
212 | |
209 NotificationDelegate* delegate() const { return delegate_.get(); } | 213 NotificationDelegate* delegate() const { return delegate_.get(); } |
210 | 214 |
211 const RichNotificationData& rich_notification_data() const { | 215 const RichNotificationData& rich_notification_data() const { |
212 return optional_fields_; | 216 return optional_fields_; |
213 } | 217 } |
214 | 218 |
215 // Set the priority to SYSTEM. The system priority user needs to call this | 219 // Set the priority to SYSTEM. The system priority user needs to call this |
216 // method explicitly, to avoid setting it accidentally. | 220 // method explicitly, to avoid setting it accidentally. |
217 void SetSystemPriority(); | 221 void SetSystemPriority(); |
218 | 222 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
266 bool is_read_; // True if this has been seen in the message center. | 270 bool is_read_; // True if this has been seen in the message center. |
267 | 271 |
268 // A proxy object that allows access back to the JavaScript object that | 272 // A proxy object that allows access back to the JavaScript object that |
269 // represents the notification, for firing events. | 273 // represents the notification, for firing events. |
270 scoped_refptr<NotificationDelegate> delegate_; | 274 scoped_refptr<NotificationDelegate> delegate_; |
271 }; | 275 }; |
272 | 276 |
273 } // namespace message_center | 277 } // namespace message_center |
274 | 278 |
275 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ | 279 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ |
OLD | NEW |