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

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

Issue 1054573002: Implement support for notification.vibrate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « content/public/common/platform_notification_data.h ('k') | ui/message_center/notification.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 std::vector<int> vibration_pattern;
53 bool silent; 54 bool silent;
54 }; 55 };
55 56
56 class MESSAGE_CENTER_EXPORT Notification { 57 class MESSAGE_CENTER_EXPORT Notification {
57 public: 58 public:
58 Notification(NotificationType type, 59 Notification(NotificationType type,
59 const std::string& id, 60 const std::string& id,
60 const base::string16& title, 61 const base::string16& title,
61 const base::string16& message, 62 const base::string16& message,
62 const gfx::Image& icon, 63 const gfx::Image& icon,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 const NotifierId& notifier_id() const { return notifier_id_; } 98 const NotifierId& notifier_id() const { return notifier_id_; }
98 99
99 void set_profile_id(const std::string& profile_id) { 100 void set_profile_id(const std::string& profile_id) {
100 notifier_id_.profile_id = profile_id; 101 notifier_id_.profile_id = profile_id;
101 } 102 }
102 103
103 // Begin unpacked values from optional_fields. 104 // Begin unpacked values from optional_fields.
104 int priority() const { return optional_fields_.priority; } 105 int priority() const { return optional_fields_.priority; }
105 void set_priority(int priority) { optional_fields_.priority = priority; } 106 void set_priority(int priority) { optional_fields_.priority = priority; }
106 107
108 // This vibration_pattern property currently has no effect on
109 // non-Android platforms.
110 const std::vector<int>& vibration_pattern() const {
111 return optional_fields_.vibration_pattern;
112 }
113 void set_vibration_pattern(const std::vector<int>& vibration_pattern) {
114 optional_fields_.vibration_pattern = vibration_pattern;
115 }
116
107 // This property currently has no effect on non-Android platforms. 117 // This property currently has no effect on non-Android platforms.
108 bool silent() const { return optional_fields_.silent; } 118 bool silent() const { return optional_fields_.silent; }
109 void set_silent(bool silent) { optional_fields_.silent = silent; } 119 void set_silent(bool silent) { optional_fields_.silent = silent; }
110 120
111 base::Time timestamp() const { return optional_fields_.timestamp; } 121 base::Time timestamp() const { return optional_fields_.timestamp; }
112 void set_timestamp(const base::Time& timestamp) { 122 void set_timestamp(const base::Time& timestamp) {
113 optional_fields_.timestamp = timestamp; 123 optional_fields_.timestamp = timestamp;
114 } 124 }
115 125
116 const base::string16& context_message() const { 126 const base::string16& context_message() const {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 bool is_read_; // True if this has been seen in the message center. 240 bool is_read_; // True if this has been seen in the message center.
231 241
232 // A proxy object that allows access back to the JavaScript object that 242 // A proxy object that allows access back to the JavaScript object that
233 // represents the notification, for firing events. 243 // represents the notification, for firing events.
234 scoped_refptr<NotificationDelegate> delegate_; 244 scoped_refptr<NotificationDelegate> delegate_;
235 }; 245 };
236 246
237 } // namespace message_center 247 } // namespace message_center
238 248
239 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ 249 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_
OLDNEW
« no previous file with comments | « content/public/common/platform_notification_data.h ('k') | ui/message_center/notification.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698