Chromium Code Reviews| 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: 17 | 5 // Next MinVersion: 18 |
| 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] |
| 16 enum OrientationLock { | 16 enum OrientationLock { |
| 17 NONE = 0, | 17 NONE = 0, |
| 18 // Rotated 90 or 270 deg. | 18 // Rotated 90 or 270 deg. |
| 19 PORTRAIT = 1, | 19 PORTRAIT = 1, |
| 20 // Rotated 0 or 180 deg. | 20 // Rotated 0 or 180 deg. |
| 21 LANDSCAPE = 2, | 21 LANDSCAPE = 2, |
| 22 // Keep the current orientation. | 22 // Keep the current orientation. |
| 23 CURRENT = 3, | 23 CURRENT = 3, |
| 24 // Rotated 90 deg. | 24 // Rotated 90 deg. |
| 25 PORTRAIT_PRIMARY = 4, | 25 PORTRAIT_PRIMARY = 4, |
| 26 // Rotated 0 deg. | 26 // Rotated 0 deg. |
| 27 LANDSCAPE_PRIMARY = 5, | 27 LANDSCAPE_PRIMARY = 5, |
| 28 // Rotated 270 deg. | 28 // Rotated 270 deg. |
| 29 PORTRAIT_SECONDARY = 6, | 29 PORTRAIT_SECONDARY = 6, |
| 30 // Rotated 180 deg. | 30 // Rotated 180 deg. |
| 31 LANDSCAPE_SECONDARY = 7, | 31 LANDSCAPE_SECONDARY = 7, |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 // Describes installation result. | |
| 35 struct InstallationResult { | |
| 36 string package_name; | |
| 37 bool success; // true if app was installed successfully. | |
| 38 }; | |
| 39 | |
| 34 // Describes ARC app. | 40 // Describes ARC app. |
| 35 struct AppInfo { | 41 struct AppInfo { |
| 36 string name; | 42 string name; |
| 37 string package_name; | 43 string package_name; |
| 38 string activity; | 44 string activity; |
| 39 [MinVersion=2] bool sticky; // true if the app cannot be uninstalled | 45 [MinVersion=2] bool sticky; // true if the app cannot be uninstalled |
| 40 [MinVersion=7] bool notifications_enabled; | 46 [MinVersion=7] bool notifications_enabled; |
| 41 [MinVersion=12] OrientationLock orientation_lock; | 47 [MinVersion=12] OrientationLock orientation_lock; |
| 42 }; | 48 }; |
| 43 | 49 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 122 // Notifies that task has been activated. | 128 // Notifies that task has been activated. |
| 123 [MinVersion=4] OnTaskSetActive@6(int32 task_id); | 129 [MinVersion=4] OnTaskSetActive@6(int32 task_id); |
| 124 | 130 |
| 125 // Notifies that notifications enabled settings in Android is changed. | 131 // Notifies that notifications enabled settings in Android is changed. |
| 126 [MinVersion=7] OnNotificationsEnabledChanged@7(string package_name, | 132 [MinVersion=7] OnNotificationsEnabledChanged@7(string package_name, |
| 127 bool enabled); | 133 bool enabled); |
| 128 | 134 |
| 129 // Notifies that an application shortcut needs to be created. | 135 // Notifies that an application shortcut needs to be created. |
| 130 [MinVersion=9] OnInstallShortcut@11(ShortcutInfo shortcut); | 136 [MinVersion=9] OnInstallShortcut@11(ShortcutInfo shortcut); |
| 131 | 137 |
| 132 // Notifies that Play Store installation has been started. | 138 // Notifies that Play Store installation has been started. |package_name| |
| 133 [MinVersion=16] OnInstallationStarted@14(); | 139 // specifies installation package |
| 140 [MinVersion=16] OnInstallationStarted@14( | |
| 141 [MinVersion=17] string? package_name@0); | |
|
dcheng
2017/01/05 06:54:05
How come the package name is optional here?
khmel
2017/01/05 15:24:29
My intention here to support versions < 17. If I d
| |
| 134 | 142 |
| 135 // Notifies that Play Store installation is finished. | 143 // Notifies that Play Store installation is finished. |result| contains |
| 136 [MinVersion=16] OnInstallationFinished@15(); | 144 // details of installation result. |
| 145 [MinVersion=16] OnInstallationFinished@15( | |
| 146 [MinVersion=17] InstallationResult? result@1); | |
| 137 | 147 |
| 138 // Notifies that task requested orientation lock. | 148 // Notifies that task requested orientation lock. |
| 139 [MinVersion=12] OnTaskOrientationLockRequested@12(int32 task_id, | 149 [MinVersion=12] OnTaskOrientationLockRequested@12(int32 task_id, |
| 140 OrientationLock lock); | 150 OrientationLock lock); |
| 141 }; | 151 }; |
| 142 | 152 |
| 143 // TODO(lhchavez): Migrate all request/response messages to Mojo. | 153 // TODO(lhchavez): Migrate all request/response messages to Mojo. |
| 144 // Next method ID: 16 | 154 // Next method ID: 16 |
| 145 // Deprecated method ID: 9 | 155 // Deprecated method ID: 9 |
| 146 interface AppInstance { | 156 interface AppInstance { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 207 ShowPackageInfoPage page, | 217 ShowPackageInfoPage page, |
| 208 ScreenRect dimension_on_screen); | 218 ScreenRect dimension_on_screen); |
| 209 | 219 |
| 210 // Sets notification setting for the package. | 220 // Sets notification setting for the package. |
| 211 [MinVersion=6] SetNotificationsEnabled@10(string package_name, bool enabled); | 221 [MinVersion=6] SetNotificationsEnabled@10(string package_name, bool enabled); |
| 212 | 222 |
| 213 // Sends a request to ARC to uninstall the given package. Error (if ever | 223 // Sends a request to ARC to uninstall the given package. Error (if ever |
| 214 // happens) is ignored, and uninstall option should appear in the UI. | 224 // happens) is ignored, and uninstall option should appear in the UI. |
| 215 [MinVersion=2] UninstallPackage@5(string package_name); | 225 [MinVersion=2] UninstallPackage@5(string package_name); |
| 216 }; | 226 }; |
| OLD | NEW |