OLD | NEW |
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: 5 | 5 // Next MinVersion: 6 |
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 enum ArcNotificationEvent { | 13 enum ArcNotificationEvent { |
14 BODY_CLICKED = 0, | 14 BODY_CLICKED = 0, |
15 CLOSED = 1, | 15 CLOSED = 1, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 bool no_clear; | 63 bool no_clear; |
64 // Flag if the notification has FLAG_ONGOING_EVENT. | 64 // Flag if the notification has FLAG_ONGOING_EVENT. |
65 [MinVersion=1] | 65 [MinVersion=1] |
66 bool ongoing_event; | 66 bool ongoing_event; |
67 // Subtexts for list notifications. | 67 // Subtexts for list notifications. |
68 [MinVersion=3] | 68 [MinVersion=3] |
69 array<string>? texts; | 69 array<string>? texts; |
70 // Image for image notifications. | 70 // Image for image notifications. |
71 [MinVersion=3] | 71 [MinVersion=3] |
72 ArcBitmap? big_picture; | 72 ArcBitmap? big_picture; |
| 73 // Flag if notification is a custom notification backed by a notification |
| 74 // surface. Note the flag is only used on creation. Change of the flag |
| 75 // on notification update is ignored. |
| 76 [MinVersion=5] |
| 77 bool use_custom_notification; |
73 }; | 78 }; |
74 | 79 |
75 [MinVersion=2] | 80 [MinVersion=2] |
76 struct ArcToastData { | 81 struct ArcToastData { |
77 // Unique identifier | 82 // Unique identifier |
78 string id; | 83 string id; |
79 // Toast text. | 84 // Toast text. |
80 string? text; | 85 string? text; |
81 // Toast duration in milliseconds. If -1, the toast will be displayed until | 86 // Toast duration in milliseconds. If -1, the toast will be displayed until |
82 // the dismiss button is clicked. | 87 // the dismiss button is clicked. |
(...skipping 25 matching lines...) Expand all Loading... |
108 | 113 |
109 // TODO(lhchavez): Migrate all request/response messages to Mojo. | 114 // TODO(lhchavez): Migrate all request/response messages to Mojo. |
110 interface NotificationsInstance { | 115 interface NotificationsInstance { |
111 // Establishes full-duplex communication with the host. | 116 // Establishes full-duplex communication with the host. |
112 Init(NotificationsHost host_ptr); | 117 Init(NotificationsHost host_ptr); |
113 | 118 |
114 // Sends an event from Chrome notification UI to Android. | 119 // Sends an event from Chrome notification UI to Android. |
115 // |event| is a type of occured event. | 120 // |event| is a type of occured event. |
116 SendNotificationEventToAndroid(string key, ArcNotificationEvent event); | 121 SendNotificationEventToAndroid(string key, ArcNotificationEvent event); |
117 }; | 122 }; |
OLD | NEW |