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 module arc.mojom; | 5 module arc.mojom; |
6 | 6 |
7 import "bitmap.mojom"; | 7 import "bitmap.mojom"; |
8 | 8 |
9 // These values must be matched with the NOTIFICATION_EVENT_* constants in | 9 // These values must be matched with the NOTIFICATION_EVENT_* constants in |
10 // com.android.server.ArcNotificationListenerService. | 10 // com.android.server.ArcNotificationListenerService. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // Image for image notifications. | 68 // Image for image notifications. |
69 [MinVersion=3] | 69 [MinVersion=3] |
70 ArcBitmap? big_picture; | 70 ArcBitmap? big_picture; |
71 }; | 71 }; |
72 | 72 |
73 [MinVersion=2] | 73 [MinVersion=2] |
74 struct ArcToastData { | 74 struct ArcToastData { |
75 // Unique identifier | 75 // Unique identifier |
76 string id; | 76 string id; |
77 // Toast text. | 77 // Toast text. |
78 string text; | 78 string? text; |
79 // Toast duration in milliseconds. | 79 // Toast duration in milliseconds. |
80 int32 duration; | 80 int32 duration; |
81 }; | 81 }; |
82 | 82 |
83 interface NotificationsHost { | 83 interface NotificationsHost { |
84 // Tells the Chrome that a notification is posted (created or updated) on | 84 // Tells the Chrome that a notification is posted (created or updated) on |
85 // Android. | 85 // Android. |
86 // |notification_data| is the data of notification (id, texts, icon and ...). | 86 // |notification_data| is the data of notification (id, texts, icon and ...). |
87 OnNotificationPosted@0(ArcNotificationData notification_data); | 87 OnNotificationPosted@0(ArcNotificationData notification_data); |
88 | 88 |
(...skipping 12 matching lines...) Expand all Loading... |
101 | 101 |
102 // TODO(lhchavez): Migrate all request/response messages to Mojo. | 102 // TODO(lhchavez): Migrate all request/response messages to Mojo. |
103 interface NotificationsInstance { | 103 interface NotificationsInstance { |
104 // Establishes full-duplex communication with the host. | 104 // Establishes full-duplex communication with the host. |
105 Init(NotificationsHost host_ptr); | 105 Init(NotificationsHost host_ptr); |
106 | 106 |
107 // Sends an event from Chrome notification UI to Android. | 107 // Sends an event from Chrome notification UI to Android. |
108 // |event| is a type of occured event. | 108 // |event| is a type of occured event. |
109 SendNotificationEventToAndroid(string key, ArcNotificationEvent event); | 109 SendNotificationEventToAndroid(string key, ArcNotificationEvent event); |
110 }; | 110 }; |
OLD | NEW |