| 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: 21 | 5 // Next MinVersion: 20 |
| 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 | |
| 91 // Next method ID: 18 | 78 // Next method ID: 18 |
| 92 interface AppHost { | 79 interface AppHost { |
| 93 // Sends newly added ARC app to Chrome. This message is sent when ARC receives | 80 // Sends newly added ARC app to Chrome. This message is sent when ARC receives |
| 94 // package added notification. Multiple apps may be added in the one package. | 81 // package added notification. Multiple apps may be added in the one package. |
| 95 [MinVersion=1] OnAppAddedDeprecated@2(AppInfo app); | 82 [MinVersion=1] OnAppAddedDeprecated@2(AppInfo app); |
| 96 | 83 |
| 97 // Receives an icon of required |scale_factor| for specific ARC app. The app | 84 // Receives an icon of required |scale_factor| for specific ARC app. The app |
| 98 // is defined by |package_name| and |activity|. The icon content cannot be | 85 // is defined by |package_name| and |activity|. The icon content cannot be |
| 99 // empty and must match to |scale_factor| assuming 48x48 for | 86 // empty and must match to |scale_factor| assuming 48x48 for |
| 100 // SCALE_FACTOR_100P. |scale_factor| is an enum defined at ui/base/layout.h. | 87 // 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... |
| 167 [MinVersion=16] OnInstallationFinished@15( | 154 [MinVersion=16] OnInstallationFinished@15( |
| 168 [MinVersion=17] InstallationResult? result@1); | 155 [MinVersion=17] InstallationResult? result@1); |
| 169 | 156 |
| 170 // Notifies that an application shortcut needs to be deleted. Shortcut is | 157 // Notifies that an application shortcut needs to be deleted. Shortcut is |
| 171 // defined by its |intent_uri| and |package_name|. | 158 // defined by its |intent_uri| and |package_name|. |
| 172 [MinVersion=18] OnUninstallShortcut@16(string package_name, | 159 [MinVersion=18] OnUninstallShortcut@16(string package_name, |
| 173 string intent_uri); | 160 string intent_uri); |
| 174 }; | 161 }; |
| 175 | 162 |
| 176 // TODO(lhchavez): Migrate all request/response messages to Mojo. | 163 // TODO(lhchavez): Migrate all request/response messages to Mojo. |
| 177 // Next method ID: 17 | 164 // Next method ID: 16 |
| 178 // Deprecated method ID: 9 | 165 // Deprecated method ID: 9 |
| 179 interface AppInstance { | 166 interface AppInstance { |
| 180 Init@0(AppHost host_ptr); | 167 Init@0(AppHost host_ptr); |
| 181 | 168 |
| 182 // Query if a given resolution can be handled by the application. Returns true | 169 // Query if a given resolution can be handled by the application. Returns true |
| 183 // if it can. | 170 // if it can. |
| 184 [MinVersion=1] CanHandleResolution@4(string package_name, string activity, | 171 [MinVersion=1] CanHandleResolution@4(string package_name, string activity, |
| 185 ScreenRect dimension) => | 172 ScreenRect dimension) => |
| 186 (bool can_handle); | 173 (bool can_handle); |
| 187 | 174 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 [MinVersion=10] ShowPackageInfoOnPage@15(string package_name, | 226 [MinVersion=10] ShowPackageInfoOnPage@15(string package_name, |
| 240 ShowPackageInfoPage page, | 227 ShowPackageInfoPage page, |
| 241 ScreenRect dimension_on_screen); | 228 ScreenRect dimension_on_screen); |
| 242 | 229 |
| 243 // Sets notification setting for the package. | 230 // Sets notification setting for the package. |
| 244 [MinVersion=6] SetNotificationsEnabled@10(string package_name, bool enabled); | 231 [MinVersion=6] SetNotificationsEnabled@10(string package_name, bool enabled); |
| 245 | 232 |
| 246 // Sends a request to ARC to uninstall the given package. Error (if ever | 233 // Sends a request to ARC to uninstall the given package. Error (if ever |
| 247 // happens) is ignored, and uninstall option should appear in the UI. | 234 // happens) is ignored, and uninstall option should appear in the UI. |
| 248 [MinVersion=2] UninstallPackage@5(string package_name); | 235 [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); | |
| 254 }; | 236 }; |
| OLD | NEW |