| 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: 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 enum ArcNotificationExpandState { |
| 42 FIXED_SIZE = 0, |
| 43 COLLAPSED = 1, |
| 44 EXPANDED = 2, |
| 45 }; |
| 46 |
| 39 struct ArcNotificationData { | 47 struct ArcNotificationData { |
| 40 // Identifier of notification | 48 // Identifier of notification |
| 41 string key; | 49 string key; |
| 42 // Type of notification | 50 // Type of notification |
| 43 ArcNotificationType type; | 51 ArcNotificationType type; |
| 44 // Body message of notification | 52 // Body message of notification |
| 45 string message; | 53 string message; |
| 46 // Title of notification | 54 // Title of notification |
| 47 string title; | 55 string title; |
| 48 // Mimetype of |icon_data| | 56 // Mimetype of |icon_data| |
| (...skipping 30 matching lines...) Expand all Loading... |
| 79 [MinVersion=6] | 87 [MinVersion=6] |
| 80 ArcBitmap? small_icon; | 88 ArcBitmap? small_icon; |
| 81 // A snapshot image to show before the notification window is created. | 89 // A snapshot image to show before the notification window is created. |
| 82 [MinVersion=7] | 90 [MinVersion=7] |
| 83 ArcBitmap? snapshot_image; | 91 ArcBitmap? snapshot_image; |
| 84 [MinVersion=7] | 92 [MinVersion=7] |
| 85 float snapshot_image_scale; | 93 float snapshot_image_scale; |
| 86 // Accessibility text | 94 // Accessibility text |
| 87 [MinVersion=8] | 95 [MinVersion=8] |
| 88 string? accessible_name; | 96 string? accessible_name; |
| 97 // Flag if the notification is expandable |
| 98 [MinVersion=10] |
| 99 ArcNotificationExpandState expand_state; |
| 89 }; | 100 }; |
| 90 | 101 |
| 91 [MinVersion=2] | 102 [MinVersion=2] |
| 92 struct ArcToastData { | 103 struct ArcToastData { |
| 93 // Unique identifier | 104 // Unique identifier |
| 94 string id; | 105 string id; |
| 95 // Toast text. | 106 // Toast text. |
| 96 string? text; | 107 string? text; |
| 97 // Toast duration in milliseconds. If -1, the toast will be displayed until | 108 // Toast duration in milliseconds. If -1, the toast will be displayed until |
| 98 // the dismiss button is clicked. | 109 // the dismiss button is clicked. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 // side. | 153 // side. |
| 143 [MinVersion=7] | 154 [MinVersion=7] |
| 144 CloseNotificationWindow@3(string key); | 155 CloseNotificationWindow@3(string key); |
| 145 | 156 |
| 146 // Requests to Android side to open notification settings. | 157 // Requests to Android side to open notification settings. |
| 147 // |key| is the identifier of the notification which is generated by Android | 158 // |key| is the identifier of the notification which is generated by Android |
| 148 // side. | 159 // side. |
| 149 [MinVersion=9] | 160 [MinVersion=9] |
| 150 OpenNotificationSettings@4(string key); | 161 OpenNotificationSettings@4(string key); |
| 151 }; | 162 }; |
| OLD | NEW |