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

Side by Side Diff: components/arc/common/notifications.mojom

Issue 2765923003: Extend notifications.mojom for expandable notifications. (Closed)
Patch Set: add Minversion to the enum Created 3 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
« no previous file with comments | « no previous file | ui/arc/notification/arc_custom_notification_item.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 // Next MinVersion: 10 5 // Next MinVersion: 11
6 6
7 module arc.mojom; 7 module arc.mojom;
8 8
9 import "bitmap.mojom"; 9 import "bitmap.mojom";
10 10
11 // These values must be matched with the NOTIFICATION_EVENT_* constants in 11 // These values must be matched with the NOTIFICATION_EVENT_* constants in
12 // com.android.server.ArcNotificationListenerService. 12 // com.android.server.ArcNotificationListenerService.
13 [Extensible] 13 [Extensible]
14 enum ArcNotificationEvent { 14 enum ArcNotificationEvent {
15 BODY_CLICKED = 0, 15 BODY_CLICKED = 0,
16 CLOSED = 1, 16 CLOSED = 1,
17 // Five buttons at maximum (message_center::kNotificationMaximumItems = 5). 17 // Five buttons at maximum (message_center::kNotificationMaximumItems = 5).
18 BUTTON_1_CLICKED = 2, 18 BUTTON_1_CLICKED = 2,
19 BUTTON_2_CLICKED = 3, 19 BUTTON_2_CLICKED = 3,
20 BUTTON_3_CLICKED = 4, 20 BUTTON_3_CLICKED = 4,
21 BUTTON_4_CLICKED = 5, 21 BUTTON_4_CLICKED = 5,
22 BUTTON_5_CLICKED = 6, 22 BUTTON_5_CLICKED = 6,
23 // expand/collapse the bundled notification
24 [MinVersion=10] TOGGLE_EXPANSION = 7,
23 }; 25 };
24 26
25 // These values must be matched with the NOTIFICATION_TYPE_* constants in 27 // These values must be matched with the NOTIFICATION_TYPE_* constants in
26 // com.android.server.ArcNotificationListenerService. 28 // com.android.server.ArcNotificationListenerService.
27 enum ArcNotificationType { 29 enum ArcNotificationType {
28 BASIC = 0, 30 BASIC = 0,
29 IMAGE = 1, 31 IMAGE = 1,
30 PROGRESS = 2, 32 PROGRESS = 2,
31 LIST = 3, 33 LIST = 3,
32 }; 34 };
33 35
34 struct ArcNotificationButton { 36 struct ArcNotificationButton {
35 // Title 37 // Title
36 string label; 38 string label;
37 }; 39 };
38 40
41 [Extensible, MinVersion=10]
42 enum ArcNotificationExpandState {
43 FIXED_SIZE = 0,
44 COLLAPSED = 1,
45 EXPANDED = 2,
46 };
47
39 struct ArcNotificationData { 48 struct ArcNotificationData {
40 // Identifier of notification 49 // Identifier of notification
41 string key; 50 string key;
42 // Type of notification 51 // Type of notification
43 ArcNotificationType type; 52 ArcNotificationType type;
44 // Body message of notification 53 // Body message of notification
45 string message; 54 string message;
46 // Title of notification 55 // Title of notification
47 string title; 56 string title;
48 // Mimetype of |icon_data| 57 // Mimetype of |icon_data|
(...skipping 30 matching lines...) Expand all
79 [MinVersion=6] 88 [MinVersion=6]
80 ArcBitmap? small_icon; 89 ArcBitmap? small_icon;
81 // A snapshot image to show before the notification window is created. 90 // A snapshot image to show before the notification window is created.
82 [MinVersion=7] 91 [MinVersion=7]
83 ArcBitmap? snapshot_image; 92 ArcBitmap? snapshot_image;
84 [MinVersion=7] 93 [MinVersion=7]
85 float snapshot_image_scale; 94 float snapshot_image_scale;
86 // Accessibility text 95 // Accessibility text
87 [MinVersion=8] 96 [MinVersion=8]
88 string? accessible_name; 97 string? accessible_name;
98 // Flag if the notification is expandable
99 [MinVersion=10]
100 ArcNotificationExpandState expand_state;
89 }; 101 };
90 102
91 [MinVersion=2] 103 [MinVersion=2]
92 struct ArcToastData { 104 struct ArcToastData {
93 // Unique identifier 105 // Unique identifier
94 string id; 106 string id;
95 // Toast text. 107 // Toast text.
96 string? text; 108 string? text;
97 // Toast duration in milliseconds. If -1, the toast will be displayed until 109 // Toast duration in milliseconds. If -1, the toast will be displayed until
98 // the dismiss button is clicked. 110 // the dismiss button is clicked.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // side. 154 // side.
143 [MinVersion=7] 155 [MinVersion=7]
144 CloseNotificationWindow@3(string key); 156 CloseNotificationWindow@3(string key);
145 157
146 // Requests to Android side to open notification settings. 158 // Requests to Android side to open notification settings.
147 // |key| is the identifier of the notification which is generated by Android 159 // |key| is the identifier of the notification which is generated by Android
148 // side. 160 // side.
149 [MinVersion=9] 161 [MinVersion=9]
150 OpenNotificationSettings@4(string key); 162 OpenNotificationSettings@4(string key);
151 }; 163 };
OLDNEW
« no previous file with comments | « no previous file | ui/arc/notification/arc_custom_notification_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698