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

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

Issue 2765923003: Extend notifications.mojom for expandable notifications. (Closed)
Patch Set: Created 3 years, 9 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 gfx::Image icon; 46 gfx::Image icon;
47 ButtonType type = ButtonType::BUTTON; 47 ButtonType type = ButtonType::BUTTON;
48 base::string16 placeholder; 48 base::string16 placeholder;
49 49
50 explicit ButtonInfo(const base::string16& title); 50 explicit ButtonInfo(const base::string16& title);
51 ButtonInfo(const ButtonInfo& other); 51 ButtonInfo(const ButtonInfo& other);
52 ~ButtonInfo(); 52 ~ButtonInfo();
53 ButtonInfo& operator=(const ButtonInfo& other); 53 ButtonInfo& operator=(const ButtonInfo& other);
54 }; 54 };
55 55
56 enum class NotificationExpandState { FIXED_SIZE, COLLAPSED, EXPANDED };
57
56 class MESSAGE_CENTER_EXPORT RichNotificationData { 58 class MESSAGE_CENTER_EXPORT RichNotificationData {
57 public: 59 public:
58 RichNotificationData(); 60 RichNotificationData();
59 RichNotificationData(const RichNotificationData& other); 61 RichNotificationData(const RichNotificationData& other);
60 ~RichNotificationData(); 62 ~RichNotificationData();
61 63
62 int priority; 64 int priority;
63 bool never_timeout; 65 bool never_timeout;
64 base::Time timestamp; 66 base::Time timestamp;
65 base::string16 context_message; 67 base::string16 context_message;
66 gfx::Image image; 68 gfx::Image image;
67 gfx::Image small_image; 69 gfx::Image small_image;
68 std::vector<NotificationItem> items; 70 std::vector<NotificationItem> items;
69 int progress; 71 int progress;
70 std::vector<ButtonInfo> buttons; 72 std::vector<ButtonInfo> buttons;
71 bool should_make_spoken_feedback_for_popup_updates; 73 bool should_make_spoken_feedback_for_popup_updates;
72 bool clickable; 74 bool clickable;
73 #if defined(OS_CHROMEOS) 75 #if defined(OS_CHROMEOS)
74 // Flag if the notification is pinned. If true, the notification is pinned 76 // Flag if the notification is pinned. If true, the notification is pinned
75 // and user can't remove it. 77 // and user can't remove it.
76 bool pinned; 78 bool pinned;
79 // For the expand state of the notification
80 NotificationExpandState expand_state;
77 #endif // defined(OS_CHROMEOS) 81 #endif // defined(OS_CHROMEOS)
78 std::vector<int> vibration_pattern; 82 std::vector<int> vibration_pattern;
79 bool renotify; 83 bool renotify;
80 bool silent; 84 bool silent;
81 base::string16 accessible_name; 85 base::string16 accessible_name;
82 }; 86 };
83 87
84 class MESSAGE_CENTER_EXPORT Notification { 88 class MESSAGE_CENTER_EXPORT Notification {
85 public: 89 public:
86 // Default constructor needed for generated mojom files 90 // Default constructor needed for generated mojom files
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 scoped_refptr<NotificationDelegate> delegate_; 313 scoped_refptr<NotificationDelegate> delegate_;
310 314
311 #if !defined(OS_IOS) 315 #if !defined(OS_IOS)
312 friend struct mojo::StructTraits<mojom::NotificationDataView, Notification>; 316 friend struct mojo::StructTraits<mojom::NotificationDataView, Notification>;
313 #endif 317 #endif
314 }; 318 };
315 319
316 } // namespace message_center 320 } // namespace message_center
317 321
318 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ 322 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698