Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: components/arc/common/app.mojom

Issue 2112013002: Allow arc app to lock screen orientation in TouchView/Tablet mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unit test Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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: 11 5 // Next MinVersion: 12
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.
13 [Extensible]
14 enum OrientationLock {
15 NONE = 0,
16 PORTRAIT = 1,
17 LANDSCAPE = 2,
18 };
19
12 // Describes ARC app. 20 // Describes ARC app.
13 struct AppInfo { 21 struct AppInfo {
14 string name; 22 string name;
15 string package_name; 23 string package_name;
16 string activity; 24 string activity;
17 [MinVersion=2] bool sticky; // true if the app cannot be uninstalled 25 [MinVersion=2] bool sticky; // true if the app cannot be uninstalled
18 [MinVersion=7] bool notifications_enabled; 26 [MinVersion=7] bool notifications_enabled;
27 [MinVersion=11] OrientationLock orientation_lock;
19 }; 28 };
20 29
21 // Describes ARC package. 30 // Describes ARC package.
22 struct ArcPackageInfo { 31 struct ArcPackageInfo {
23 string package_name; 32 string package_name;
24 int32 package_version; 33 int32 package_version;
25 int64 last_backup_android_id; 34 int64 last_backup_android_id;
26 int64 last_backup_time; 35 int64 last_backup_time;
27 bool sync; // true if package installation should be synced 36 bool sync; // true if package installation should be synced
28 }; 37 };
29 38
30 // Describes ARC app shortcut. 39 // Describes ARC app shortcut.
31 struct ShortcutInfo { 40 struct ShortcutInfo {
32 string name; 41 string name;
33 string package_name; 42 string package_name;
34 string icon_resource_id; 43 string icon_resource_id;
35 string intent_uri; 44 string intent_uri;
36 }; 45 };
37 46
38 // Page for ShowPackageInfoOnPage. 47 // Page for ShowPackageInfoOnPage.
39 [Extensible] 48 [Extensible]
40 enum ShowPackageInfoPage { 49 enum ShowPackageInfoPage {
41 // The main package info page. 50 // The main package info page.
42 MAIN = 0, 51 MAIN = 0,
43 52
44 // Page for managing links assigned to the app. 53 // Page for managing links assigned to the app.
45 MANAGE_LINKS = 1, 54 MANAGE_LINKS = 1,
46 }; 55 };
47 56
48 // Next method ID: 12 57 // Next method ID: 13
49 interface AppHost { 58 interface AppHost {
50 // Sends newly added ARC app to Chrome. This message is sent when ARC receives 59 // Sends newly added ARC app to Chrome. This message is sent when ARC receives
51 // package added notification. Multiple apps may be added in the one package. 60 // package added notification. Multiple apps may be added in the one package.
52 [MinVersion=1] OnAppAdded@2(AppInfo app); 61 [MinVersion=1] OnAppAdded@2(AppInfo app);
53 62
54 // Receives an icon of required |scale_factor| for specific ARC app. The app 63 // Receives an icon of required |scale_factor| for specific ARC app. The app
55 // is defined by |package_name| and |activity|. The icon content cannot be 64 // is defined by |package_name| and |activity|. The icon content cannot be
56 // empty and must match to |scale_factor| assuming 48x48 for 65 // empty and must match to |scale_factor| assuming 48x48 for
57 // SCALE_FACTOR_100P. |scale_factor| is an enum defined at ui/base/layout.h. 66 // SCALE_FACTOR_100P. |scale_factor| is an enum defined at ui/base/layout.h.
58 // |icon_png_data| is a png-encoded image. 67 // |icon_png_data| is a png-encoded image.
(...skipping 29 matching lines...) Expand all
88 97
89 // Notifies that task has been activated. 98 // Notifies that task has been activated.
90 [MinVersion=4] OnTaskSetActive@6(int32 task_id); 99 [MinVersion=4] OnTaskSetActive@6(int32 task_id);
91 100
92 // Notifies that notifications enabled settings in Android is changed. 101 // Notifies that notifications enabled settings in Android is changed.
93 [MinVersion=7] OnNotificationsEnabledChanged@7(string package_name, 102 [MinVersion=7] OnNotificationsEnabledChanged@7(string package_name,
94 bool enabled); 103 bool enabled);
95 104
96 // Notifies that an application shortcut needs to be created. 105 // Notifies that an application shortcut needs to be created.
97 [MinVersion=9] OnInstallShortcut@11(ShortcutInfo shortcut); 106 [MinVersion=9] OnInstallShortcut@11(ShortcutInfo shortcut);
107
108 // Notifies that task requested orientation lock.
109 [MinVersion=11] OnTaskOrientationLockRequested@12(int32 task_id,
110 OrientationLock lock);
98 }; 111 };
99 112
100 // TODO(lhchavez): Migrate all request/response messages to Mojo. 113 // TODO(lhchavez): Migrate all request/response messages to Mojo.
101 // Next method ID: 16 114 // Next method ID: 16
102 // Deprecated method ID: 9 115 // Deprecated method ID: 9
103 interface AppInstance { 116 interface AppInstance {
104 Init@0(AppHost host_ptr); 117 Init@0(AppHost host_ptr);
105 118
106 // Query if a given resolution can be handled by the application. Returns true 119 // Query if a given resolution can be handled by the application. Returns true
107 // if it can. 120 // if it can.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 ShowPackageInfoPage page, 177 ShowPackageInfoPage page,
165 ScreenRect dimension_on_screen); 178 ScreenRect dimension_on_screen);
166 179
167 // Sets notification setting for the package. 180 // Sets notification setting for the package.
168 [MinVersion=6] SetNotificationsEnabled@10(string package_name, bool enabled); 181 [MinVersion=6] SetNotificationsEnabled@10(string package_name, bool enabled);
169 182
170 // Sends a request to ARC to uninstall the given package. Error (if ever 183 // Sends a request to ARC to uninstall the given package. Error (if ever
171 // happens) is ignored, and uninstall option should appear in the UI. 184 // happens) is ignored, and uninstall option should appear in the UI.
172 [MinVersion=2] UninstallPackage@5(string package_name); 185 [MinVersion=2] UninstallPackage@5(string package_name);
173 }; 186 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698