| 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 module arc; | 5 module arc; |
| 6 | 6 |
| 7 // Duplicates ui::ScaleFactor enum in order to be accessible on Android side. | 7 // Duplicates ui::ScaleFactor enum in order to be accessible on Android side. |
| 8 enum ScaleFactor { | 8 enum ScaleFactor { |
| 9 SCALE_FACTOR_NONE = 0, | 9 SCALE_FACTOR_NONE = 0, |
| 10 SCALE_FACTOR_100P, | 10 SCALE_FACTOR_100P, |
| 11 SCALE_FACTOR_125P, | 11 SCALE_FACTOR_125P, |
| 12 SCALE_FACTOR_133P, | 12 SCALE_FACTOR_133P, |
| 13 SCALE_FACTOR_140P, | 13 SCALE_FACTOR_140P, |
| 14 SCALE_FACTOR_150P, | 14 SCALE_FACTOR_150P, |
| 15 SCALE_FACTOR_180P, | 15 SCALE_FACTOR_180P, |
| 16 SCALE_FACTOR_200P, | 16 SCALE_FACTOR_200P, |
| 17 SCALE_FACTOR_250P, | 17 SCALE_FACTOR_250P, |
| 18 SCALE_FACTOR_300P, | 18 SCALE_FACTOR_300P, |
| 19 | 19 |
| 20 NUM_SCALE_FACTORS | 20 NUM_SCALE_FACTORS |
| 21 }; | 21 }; |
| 22 | 22 |
| 23 // Describes ARC app. | 23 // Describes ARC app. |
| 24 struct AppInfo { | 24 struct AppInfo { |
| 25 string name; | 25 string name; |
| 26 string package_name; | 26 string package_name; |
| 27 string activity; | 27 string activity; |
| 28 [MinVersion=2] bool sticky; // true if the app cannot be uninstalled |
| 28 }; | 29 }; |
| 29 | 30 |
| 30 // Represents a rectangle to specify screen coordinates. | 31 // Represents a rectangle to specify screen coordinates. |
| 31 struct ScreenRect { | 32 struct ScreenRect { |
| 32 int32 left; | 33 int32 left; |
| 33 int32 top; | 34 int32 top; |
| 34 int32 right; | 35 int32 right; |
| 35 int32 bottom; | 36 int32 bottom; |
| 36 }; | 37 }; |
| 37 | 38 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // Sends a request to ARC for the ARC app icon of a required scale factor. | 79 // Sends a request to ARC for the ARC app icon of a required scale factor. |
| 79 // Scale factor is an enum defined at ui/base/layout.h. App is defined by | 80 // Scale factor is an enum defined at ui/base/layout.h. App is defined by |
| 80 // |package_name| and |activity|, which cannot be empty. | 81 // |package_name| and |activity|, which cannot be empty. |
| 81 RequestAppIcon(string package_name, string activity, | 82 RequestAppIcon(string package_name, string activity, |
| 82 ScaleFactor scale_factor); | 83 ScaleFactor scale_factor); |
| 83 | 84 |
| 84 // Query if a given resolution can be handled by the application. Returns true | 85 // Query if a given resolution can be handled by the application. Returns true |
| 85 // if it can. | 86 // if it can. |
| 86 [MinVersion=1] CanHandleResolution(string package_name, string activity, | 87 [MinVersion=1] CanHandleResolution(string package_name, string activity, |
| 87 ScreenRect dimension) => (bool success); | 88 ScreenRect dimension) => (bool success); |
| 89 |
| 90 // Sends a request to ARC to uninstall the given app. Error message (UTF-8 |
| 91 // string), or null if succeeds, is returned via the callback. |
| 92 [MinVersion=2] UninstallApp(string package) => (string error_message); |
| 88 }; | 93 }; |
| OLD | NEW |