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: 8 | 5 // Next MinVersion: 9 |
| 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 ARC app. | 12 // Describes ARC app. |
| 13 struct AppInfo { | 13 struct AppInfo { |
| 14 string name; | 14 string name; |
| 15 string package_name; | 15 string package_name; |
| 16 string activity; | 16 string activity; |
| 17 [MinVersion=2] bool sticky; // true if the app cannot be uninstalled | 17 [MinVersion=2] bool sticky; // true if the app cannot be uninstalled |
| 18 [MinVersion=7] bool notifications_enabled; | 18 [MinVersion=7] bool notifications_enabled; |
| 19 }; | 19 }; |
| 20 | 20 |
| 21 // Page for ShowPackageInfoOnPage. | |
| 22 [Extensible] | |
| 23 enum ShowPackageInfoPage { | |
| 24 MAIN = 0, | |
| 25 MANAGE_LINKS = 1, | |
|
dcheng
2016/06/20 15:31:45
Perhaps explain what these different values mean?
mtomasz
2016/06/21 00:38:20
Done.
| |
| 26 }; | |
| 27 | |
| 21 // Next method ID: 8 | 28 // Next method ID: 8 |
| 22 interface AppHost { | 29 interface AppHost { |
| 23 // Sends newly added ARC app to Chrome. This message is sent when ARC receives | 30 // Sends newly added ARC app to Chrome. This message is sent when ARC receives |
| 24 // package added notification. Multiple apps may be added in the one package. | 31 // package added notification. Multiple apps may be added in the one package. |
| 25 [MinVersion=1] OnAppAdded@2(AppInfo app); | 32 [MinVersion=1] OnAppAdded@2(AppInfo app); |
| 26 | 33 |
| 27 // Receives an icon of required |scale_factor| for specific ARC app. The app | 34 // Receives an icon of required |scale_factor| for specific ARC app. The app |
| 28 // is defined by |package_name| and |activity|. The icon content cannot be | 35 // is defined by |package_name| and |activity|. The icon content cannot be |
| 29 // empty and must match to |scale_factor| assuming 48x48 for | 36 // empty and must match to |scale_factor| assuming 48x48 for |
| 30 // SCALE_FACTOR_100P. |scale_factor| is an enum defined at ui/base/layout.h. | 37 // SCALE_FACTOR_100P. |scale_factor| is an enum defined at ui/base/layout.h. |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 51 | 58 |
| 52 // Notifies that task has been activated. | 59 // Notifies that task has been activated. |
| 53 [MinVersion=4] OnTaskSetActive@6(int32 task_id); | 60 [MinVersion=4] OnTaskSetActive@6(int32 task_id); |
| 54 | 61 |
| 55 // Notifies that notifications enabled settings in Android is changed. | 62 // Notifies that notifications enabled settings in Android is changed. |
| 56 [MinVersion=7] OnNotificationsEnabledChanged@7(string package_name, | 63 [MinVersion=7] OnNotificationsEnabledChanged@7(string package_name, |
| 57 bool enabled); | 64 bool enabled); |
| 58 }; | 65 }; |
| 59 | 66 |
| 60 // TODO(lhchavez): Migrate all request/response messages to Mojo. | 67 // TODO(lhchavez): Migrate all request/response messages to Mojo. |
| 61 // Next method ID: 11 | 68 // Next method ID: 12 |
| 69 // Deprecated method ID: 9 | |
| 62 interface AppInstance { | 70 interface AppInstance { |
| 63 Init@0(AppHost host_ptr); | 71 Init@0(AppHost host_ptr); |
| 64 | 72 |
| 65 // Query if a given resolution can be handled by the application. Returns true | 73 // Query if a given resolution can be handled by the application. Returns true |
| 66 // if it can. | 74 // if it can. |
| 67 [MinVersion=1] CanHandleResolution@4(string package_name, string activity, | 75 [MinVersion=1] CanHandleResolution@4(string package_name, string activity, |
| 68 ScreenRect dimension) => | 76 ScreenRect dimension) => |
| 69 (bool can_handle); | 77 (bool can_handle); |
| 70 | 78 |
| 71 // Closes the the given task. | 79 // Closes the the given task. |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 90 // Sends a request to ARC for the ARC app icon of a required scale factor. | 98 // Sends a request to ARC for the ARC app icon of a required scale factor. |
| 91 // Scale factor is an enum defined at ui/base/layout.h. App is defined by | 99 // Scale factor is an enum defined at ui/base/layout.h. App is defined by |
| 92 // |package_name| and |activity|, which cannot be empty. | 100 // |package_name| and |activity|, which cannot be empty. |
| 93 RequestAppIcon@3(string package_name, string activity, | 101 RequestAppIcon@3(string package_name, string activity, |
| 94 ScaleFactor scale_factor); | 102 ScaleFactor scale_factor); |
| 95 | 103 |
| 96 // Activates the given task and move it to foreground. | 104 // Activates the given task and move it to foreground. |
| 97 [MinVersion=4] SetTaskActive@7(int32 task_id); | 105 [MinVersion=4] SetTaskActive@7(int32 task_id); |
| 98 | 106 |
| 99 // Send a request to ARC to show package info for given package. | 107 // Send a request to ARC to show package info for given package. |
| 100 [MinVersion=5] ShowPackageInfo@9(string package_name, | 108 [MinVersion=5] ShowPackageInfoDeprecated@9(string package_name, |
| 101 ScreenRect dimension_on_screen); | 109 ScreenRect dimension_on_screen); |
| 102 | 110 |
| 111 // Send a request to ARC to show package info for given package on the | |
| 112 // specified page. | |
| 113 [MinVersion=8] ShowPackageInfoOnPage@11(string package_name, | |
| 114 ShowPackageInfoPage page, | |
| 115 ScreenRect dimension_on_screen); | |
| 116 | |
| 103 // Sets notification setting for the package. | 117 // Sets notification setting for the package. |
| 104 [MinVersion=6] SetNotificationsEnabled@10(string package_name, bool enabled); | 118 [MinVersion=6] SetNotificationsEnabled@10(string package_name, bool enabled); |
| 105 | 119 |
| 106 // Sends a request to ARC to uninstall the given package. Error (if ever | 120 // Sends a request to ARC to uninstall the given package. Error (if ever |
| 107 // happens) is ignored, and uninstall option should appear in the UI. | 121 // happens) is ignored, and uninstall option should appear in the UI. |
| 108 [MinVersion=2] UninstallPackage@5(string package_name); | 122 [MinVersion=2] UninstallPackage@5(string package_name); |
| 109 }; | 123 }; |
| OLD | NEW |