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

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

Issue 2337963003: Plumb through notification action types and placeholders on Android (Closed)
Patch Set: 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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "base/strings/nullable_string16.h"
14 #include "base/time/time.h" 15 #include "base/time/time.h"
15 #include "base/values.h" 16 #include "base/values.h"
16 #include "ui/gfx/image/image.h" 17 #include "ui/gfx/image/image.h"
17 #include "ui/message_center/message_center_export.h" 18 #include "ui/message_center/message_center_export.h"
18 #include "ui/message_center/notification_delegate.h" 19 #include "ui/message_center/notification_delegate.h"
19 #include "ui/message_center/notification_types.h" 20 #include "ui/message_center/notification_types.h"
20 #include "ui/message_center/notifier_settings.h" 21 #include "ui/message_center/notifier_settings.h"
21 #include "url/gurl.h" 22 #include "url/gurl.h"
22 23
23 namespace message_center { 24 namespace message_center {
24 25
25 struct MESSAGE_CENTER_EXPORT NotificationItem { 26 struct MESSAGE_CENTER_EXPORT NotificationItem {
26 base::string16 title; 27 base::string16 title;
27 base::string16 message; 28 base::string16 message;
28 29
29 NotificationItem(const base::string16& title, const base::string16& message); 30 NotificationItem(const base::string16& title, const base::string16& message);
30 }; 31 };
31 32
33 enum class NotificationActionType { BUTTON, TEXT };
awdf 2016/09/13 14:14:55 wasn't sure where to put this
Peter Beverloo 2016/09/14 16:27:12 This is fine. Probably should call it ButtonType t
awdf 2016/09/22 14:17:12 Done.
34
32 struct MESSAGE_CENTER_EXPORT ButtonInfo { 35 struct MESSAGE_CENTER_EXPORT ButtonInfo {
33 base::string16 title; 36 base::string16 title;
34 gfx::Image icon; 37 gfx::Image icon;
38 message_center::NotificationActionType type;
Peter Beverloo 2016/09/14 16:27:12 nit: no need to prefix with "message_center::", th
awdf 2016/09/26 15:33:28 Done.
39 base::NullableString16 placeholder;
Peter Beverloo 2016/09/14 16:27:12 I think you should see compile errors about this c
awdf 2016/09/22 14:17:12 I didn't see any compile errors about this, can yo
Peter Beverloo 2016/09/22 18:07:55 I saw compile errors when building this. Maybe run
awdf 2016/09/26 15:33:28 Done.
35 40
36 ButtonInfo(const base::string16& title); 41 ButtonInfo(const base::string16& title);
37 }; 42 };
38 43
39 class MESSAGE_CENTER_EXPORT RichNotificationData { 44 class MESSAGE_CENTER_EXPORT RichNotificationData {
40 public: 45 public:
41 RichNotificationData(); 46 RichNotificationData();
42 RichNotificationData(const RichNotificationData& other); 47 RichNotificationData(const RichNotificationData& other);
43 ~RichNotificationData(); 48 ~RichNotificationData();
44 49
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 bool is_read_; // True if this has been seen in the message center. 290 bool is_read_; // True if this has been seen in the message center.
286 291
287 // A proxy object that allows access back to the JavaScript object that 292 // A proxy object that allows access back to the JavaScript object that
288 // represents the notification, for firing events. 293 // represents the notification, for firing events.
289 scoped_refptr<NotificationDelegate> delegate_; 294 scoped_refptr<NotificationDelegate> delegate_;
290 }; 295 };
291 296
292 } // namespace message_center 297 } // namespace message_center
293 298
294 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ 299 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698