Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Side by Side Diff: ui/message_center/notification.h

Issue 2318463002: arc: Make ChromeVox read an ARC custom notification (Closed)
Patch Set: rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 #if defined(OS_CHROMEOS) 56 #if defined(OS_CHROMEOS)
57 // Flag if the notification is pinned. If true, the notification is pinned 57 // Flag if the notification is pinned. If true, the notification is pinned
58 // and user can't remove it. 58 // and user can't remove it.
59 bool pinned; 59 bool pinned;
60 #endif // defined(OS_CHROMEOS) 60 #endif // defined(OS_CHROMEOS)
61 std::vector<int> vibration_pattern; 61 std::vector<int> vibration_pattern;
62 bool renotify; 62 bool renotify;
63 bool silent; 63 bool silent;
64 base::string16 accessible_name;
64 }; 65 };
65 66
66 class MESSAGE_CENTER_EXPORT Notification { 67 class MESSAGE_CENTER_EXPORT Notification {
67 public: 68 public:
68 Notification(NotificationType type, 69 Notification(NotificationType type,
69 const std::string& id, 70 const std::string& id,
70 const base::string16& title, 71 const base::string16& title,
71 const base::string16& message, 72 const base::string16& message,
72 const gfx::Image& icon, 73 const gfx::Image& icon,
73 const base::string16& display_source, 74 const base::string16& display_source,
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 #if defined(OS_CHROMEOS) 217 #if defined(OS_CHROMEOS)
217 return optional_fields_.pinned; 218 return optional_fields_.pinned;
218 #else 219 #else
219 return false; 220 return false;
220 #endif // defined(OS_CHROMEOS) 221 #endif // defined(OS_CHROMEOS)
221 } 222 }
222 #if defined(OS_CHROMEOS) 223 #if defined(OS_CHROMEOS)
223 void set_pinned(bool pinned) { optional_fields_.pinned = pinned; } 224 void set_pinned(bool pinned) { optional_fields_.pinned = pinned; }
224 #endif // defined(OS_CHROMEOS) 225 #endif // defined(OS_CHROMEOS)
225 226
227 // Gets a text for spoken feedback.
228 base::string16 accessible_name() const {
xiyuan 2016/09/07 16:26:08 nit: const base::string16& to avoid copying ?
yhanada 2016/09/08 03:37:23 Done.
229 return optional_fields_.accessible_name;
230 }
231
226 NotificationDelegate* delegate() const { return delegate_.get(); } 232 NotificationDelegate* delegate() const { return delegate_.get(); }
227 233
228 const RichNotificationData& rich_notification_data() const { 234 const RichNotificationData& rich_notification_data() const {
229 return optional_fields_; 235 return optional_fields_;
230 } 236 }
231 237
232 // Set the priority to SYSTEM. The system priority user needs to call this 238 // Set the priority to SYSTEM. The system priority user needs to call this
233 // method explicitly, to avoid setting it accidentally. 239 // method explicitly, to avoid setting it accidentally.
234 void SetSystemPriority(); 240 void SetSystemPriority();
235 241
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 bool is_read_; // True if this has been seen in the message center. 285 bool is_read_; // True if this has been seen in the message center.
280 286
281 // A proxy object that allows access back to the JavaScript object that 287 // A proxy object that allows access back to the JavaScript object that
282 // represents the notification, for firing events. 288 // represents the notification, for firing events.
283 scoped_refptr<NotificationDelegate> delegate_; 289 scoped_refptr<NotificationDelegate> delegate_;
284 }; 290 };
285 291
286 } // namespace message_center 292 } // namespace message_center
287 293
288 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ 294 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698