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

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

Issue 23462005: Adds the contextMessage field to notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adjust unit test due to bugfix in toast layout. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/message_center/message_center_style.cc ('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 25 matching lines...) Expand all
36 class MESSAGE_CENTER_EXPORT RichNotificationData { 36 class MESSAGE_CENTER_EXPORT RichNotificationData {
37 public: 37 public:
38 RichNotificationData(); 38 RichNotificationData();
39 RichNotificationData(const RichNotificationData& other); 39 RichNotificationData(const RichNotificationData& other);
40 ~RichNotificationData(); 40 ~RichNotificationData();
41 41
42 int priority; 42 int priority;
43 bool never_timeout; 43 bool never_timeout;
44 base::Time timestamp; 44 base::Time timestamp;
45 string16 expanded_message; 45 string16 expanded_message;
46 string16 context_message;
46 gfx::Image image; 47 gfx::Image image;
47 std::vector<NotificationItem> items; 48 std::vector<NotificationItem> items;
48 int progress; 49 int progress;
49 std::vector<ButtonInfo> buttons; 50 std::vector<ButtonInfo> buttons;
50 }; 51 };
51 52
52 class MESSAGE_CENTER_EXPORT Notification { 53 class MESSAGE_CENTER_EXPORT Notification {
53 public: 54 public:
54 Notification(NotificationType type, 55 Notification(NotificationType type,
55 const std::string& id, 56 const std::string& id,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 optional_fields_.timestamp = timestamp; 95 optional_fields_.timestamp = timestamp;
95 } 96 }
96 97
97 const string16& expanded_message() const { 98 const string16& expanded_message() const {
98 return optional_fields_.expanded_message; 99 return optional_fields_.expanded_message;
99 } 100 }
100 void set_expanded_message(const string16& expanded_message) { 101 void set_expanded_message(const string16& expanded_message) {
101 optional_fields_.expanded_message = expanded_message; 102 optional_fields_.expanded_message = expanded_message;
102 } 103 }
103 104
105 const string16& context_message() const {
106 return optional_fields_.context_message;
107 }
108 void set_context_message(const string16& context_message) {
109 optional_fields_.context_message = context_message;
110 }
111
104 const std::vector<NotificationItem>& items() const { 112 const std::vector<NotificationItem>& items() const {
105 return optional_fields_.items; 113 return optional_fields_.items;
106 } 114 }
107 void set_items(const std::vector<NotificationItem>& items) { 115 void set_items(const std::vector<NotificationItem>& items) {
108 optional_fields_.items = items; 116 optional_fields_.items = items;
109 } 117 }
110 118
111 int progress() const { return optional_fields_.progress; } 119 int progress() const { return optional_fields_.progress; }
112 void set_progress(int progress) { optional_fields_.progress = progress; } 120 void set_progress(int progress) { optional_fields_.progress = progress; }
113 // End unpacked values. 121 // End unpacked values.
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 bool is_expanded_; // True if this has been expanded in the message center. 208 bool is_expanded_; // True if this has been expanded in the message center.
201 209
202 // A proxy object that allows access back to the JavaScript object that 210 // A proxy object that allows access back to the JavaScript object that
203 // represents the notification, for firing events. 211 // represents the notification, for firing events.
204 scoped_refptr<NotificationDelegate> delegate_; 212 scoped_refptr<NotificationDelegate> delegate_;
205 }; 213 };
206 214
207 } // namespace message_center 215 } // namespace message_center
208 216
209 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ 217 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_
OLDNEW
« no previous file with comments | « ui/message_center/message_center_style.cc ('k') | ui/message_center/notification.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698