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

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

Issue 1864053002: Implement Android UI of web notification inline replies Base URL: https://chromium.googlesource.com/chromium/src.git@inline_replies_ps1
Patch Set: Fix filename? Created 4 years, 8 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/nullable_string16.h"
13 #include "base/strings/string16.h" 14 #include "base/strings/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
26 // A Java counterpart will be generated for this enum.
27 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.notifications
28 enum ButtonInfoType {
29 // Standard clickable button.
30 BUTTON_INFO_TYPE_BUTTON = 0,
31
32 // Action that supports an inline text reply.
33 BUTTON_INFO_TYPE_TEXT
34 };
35
25 struct MESSAGE_CENTER_EXPORT NotificationItem { 36 struct MESSAGE_CENTER_EXPORT NotificationItem {
26 base::string16 title; 37 base::string16 title;
27 base::string16 message; 38 base::string16 message;
28 39
29 NotificationItem(const base::string16& title, const base::string16& message); 40 NotificationItem(const base::string16& title, const base::string16& message);
30 }; 41 };
31 42
43 // TODO(nsatragno): rename to ActionInfo.
32 struct MESSAGE_CENTER_EXPORT ButtonInfo { 44 struct MESSAGE_CENTER_EXPORT ButtonInfo {
45 // Defaults to BUTTON_INFO_TYPE_BUTTON.
46 ButtonInfoType type;
33 base::string16 title; 47 base::string16 title;
34 gfx::Image icon; 48 gfx::Image icon;
49 base::NullableString16 placeholder;
35 50
36 ButtonInfo(const base::string16& title); 51 ButtonInfo(const base::string16& title);
37 }; 52 };
38 53
39 class MESSAGE_CENTER_EXPORT RichNotificationData { 54 class MESSAGE_CENTER_EXPORT RichNotificationData {
40 public: 55 public:
41 RichNotificationData(); 56 RichNotificationData();
42 RichNotificationData(const RichNotificationData& other); 57 RichNotificationData(const RichNotificationData& other);
43 ~RichNotificationData(); 58 ~RichNotificationData();
44 59
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 bool is_read_; // True if this has been seen in the message center. 303 bool is_read_; // True if this has been seen in the message center.
289 304
290 // A proxy object that allows access back to the JavaScript object that 305 // A proxy object that allows access back to the JavaScript object that
291 // represents the notification, for firing events. 306 // represents the notification, for firing events.
292 scoped_refptr<NotificationDelegate> delegate_; 307 scoped_refptr<NotificationDelegate> delegate_;
293 }; 308 };
294 309
295 } // namespace message_center 310 } // namespace message_center
296 311
297 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ 312 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_
OLDNEW
« chromium.gyp_env ('K') | « chromium.gyp_env ('k') | ui/message_center/notification.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698