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: 20 | 5 // Next MinVersion: 21 |
6 | 6 |
7 module arc.mojom; | 7 module arc.mojom; |
8 | 8 |
9 import "scale_factor.mojom"; | 9 import "scale_factor.mojom"; |
10 import "screen_rect.mojom"; | 10 import "screen_rect.mojom"; |
11 | 11 |
12 // Describes OrientationLock request. | 12 // Describes OrientationLock request. |
13 // Note: ChromeOS currently assumes the internal panel is always landscape. | 13 // Note: ChromeOS currently assumes the internal panel is always landscape. |
14 // All rotation angles mentioned here are measured clockwise. | 14 // All rotation angles mentioned here are measured clockwise. |
15 [Extensible] | 15 [Extensible] |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // Page for ShowPackageInfoOnPage. | 68 // Page for ShowPackageInfoOnPage. |
69 [Extensible] | 69 [Extensible] |
70 enum ShowPackageInfoPage { | 70 enum ShowPackageInfoPage { |
71 // The main package info page. | 71 // The main package info page. |
72 MAIN = 0, | 72 MAIN = 0, |
73 | 73 |
74 // Page for managing links assigned to the app. | 74 // Page for managing links assigned to the app. |
75 MANAGE_LINKS = 1, | 75 MANAGE_LINKS = 1, |
76 }; | 76 }; |
77 | 77 |
| 78 // Describes a Play Store app discovery result. |
| 79 struct AppDiscoveryResult { |
| 80 string? launch_intent_uri; |
| 81 string? install_intent_uri; |
| 82 string? label; |
| 83 bool is_instant_app; |
| 84 bool is_recent; |
| 85 string? publisher_name; |
| 86 string? formatted_price; |
| 87 float review_score; |
| 88 array<uint8> icon_png_data; |
| 89 }; |
| 90 |
78 // Next method ID: 18 | 91 // Next method ID: 18 |
79 interface AppHost { | 92 interface AppHost { |
80 // Sends newly added ARC app to Chrome. This message is sent when ARC receives | 93 // Sends newly added ARC app to Chrome. This message is sent when ARC receives |
81 // package added notification. Multiple apps may be added in the one package. | 94 // package added notification. Multiple apps may be added in the one package. |
82 [MinVersion=1] OnAppAddedDeprecated@2(AppInfo app); | 95 [MinVersion=1] OnAppAddedDeprecated@2(AppInfo app); |
83 | 96 |
84 // Receives an icon of required |scale_factor| for specific ARC app. The app | 97 // Receives an icon of required |scale_factor| for specific ARC app. The app |
85 // is defined by |package_name| and |activity|. The icon content cannot be | 98 // is defined by |package_name| and |activity|. The icon content cannot be |
86 // empty and must match to |scale_factor| assuming 48x48 for | 99 // empty and must match to |scale_factor| assuming 48x48 for |
87 // SCALE_FACTOR_100P. |scale_factor| is an enum defined at ui/base/layout.h. | 100 // SCALE_FACTOR_100P. |scale_factor| is an enum defined at ui/base/layout.h. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 [MinVersion=16] OnInstallationFinished@15( | 167 [MinVersion=16] OnInstallationFinished@15( |
155 [MinVersion=17] InstallationResult? result@1); | 168 [MinVersion=17] InstallationResult? result@1); |
156 | 169 |
157 // Notifies that an application shortcut needs to be deleted. Shortcut is | 170 // Notifies that an application shortcut needs to be deleted. Shortcut is |
158 // defined by its |intent_uri| and |package_name|. | 171 // defined by its |intent_uri| and |package_name|. |
159 [MinVersion=18] OnUninstallShortcut@16(string package_name, | 172 [MinVersion=18] OnUninstallShortcut@16(string package_name, |
160 string intent_uri); | 173 string intent_uri); |
161 }; | 174 }; |
162 | 175 |
163 // TODO(lhchavez): Migrate all request/response messages to Mojo. | 176 // TODO(lhchavez): Migrate all request/response messages to Mojo. |
164 // Next method ID: 16 | 177 // Next method ID: 17 |
165 // Deprecated method ID: 9 | 178 // Deprecated method ID: 9 |
166 interface AppInstance { | 179 interface AppInstance { |
167 Init@0(AppHost host_ptr); | 180 Init@0(AppHost host_ptr); |
168 | 181 |
169 // Query if a given resolution can be handled by the application. Returns true | 182 // Query if a given resolution can be handled by the application. Returns true |
170 // if it can. | 183 // if it can. |
171 [MinVersion=1] CanHandleResolution@4(string package_name, string activity, | 184 [MinVersion=1] CanHandleResolution@4(string package_name, string activity, |
172 ScreenRect dimension) => | 185 ScreenRect dimension) => |
173 (bool can_handle); | 186 (bool can_handle); |
174 | 187 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 [MinVersion=10] ShowPackageInfoOnPage@15(string package_name, | 239 [MinVersion=10] ShowPackageInfoOnPage@15(string package_name, |
227 ShowPackageInfoPage page, | 240 ShowPackageInfoPage page, |
228 ScreenRect dimension_on_screen); | 241 ScreenRect dimension_on_screen); |
229 | 242 |
230 // Sets notification setting for the package. | 243 // Sets notification setting for the package. |
231 [MinVersion=6] SetNotificationsEnabled@10(string package_name, bool enabled); | 244 [MinVersion=6] SetNotificationsEnabled@10(string package_name, bool enabled); |
232 | 245 |
233 // Sends a request to ARC to uninstall the given package. Error (if ever | 246 // Sends a request to ARC to uninstall the given package. Error (if ever |
234 // happens) is ignored, and uninstall option should appear in the UI. | 247 // happens) is ignored, and uninstall option should appear in the UI. |
235 [MinVersion=2] UninstallPackage@5(string package_name); | 248 [MinVersion=2] UninstallPackage@5(string package_name); |
| 249 |
| 250 // Starts a query for Play Store apps. |
| 251 [MinVersion=20] GetRecentAndSuggestedAppsFromPlayStore@16( |
| 252 string query, int32 max_results) => |
| 253 (array<AppDiscoveryResult> results); |
236 }; | 254 }; |
OLD | NEW |