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

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: . 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 enum OrientationLock {
Luis Héctor Chávez 2016/06/30 23:01:47 Do you envision adding more stuff to this enum? (M
oshima 2016/07/01 00:44:47 I'm not sure, and since I'm not sure, I added it :
13 NONE = 0,
14 PORTRAIT = 1,
15 LANDSCAPE = 2,
16 };
17
12 // Describes ARC app. 18 // Describes ARC app.
13 struct AppInfo { 19 struct AppInfo {
14 string name; 20 string name;
15 string package_name; 21 string package_name;
16 string activity; 22 string activity;
17 [MinVersion=2] bool sticky; // true if the app cannot be uninstalled 23 [MinVersion=2] bool sticky; // true if the app cannot be uninstalled
18 [MinVersion=7] bool notifications_enabled; 24 [MinVersion=7] bool notifications_enabled;
25 [MinVersion=11] OrientationLock orientation_lock;
19 }; 26 };
20 27
21 // Describes ARC package. 28 // Describes ARC package.
22 struct ArcPackageInfo { 29 struct ArcPackageInfo {
23 string package_name; 30 string package_name;
24 int32 package_version; 31 int32 package_version;
25 int64 last_backup_android_id; 32 int64 last_backup_android_id;
26 int64 last_backup_time; 33 int64 last_backup_time;
27 bool sync; // true if package installation should be synced 34 bool sync; // true if package installation should be synced
28 }; 35 };
29 36
30 // Describes ARC app shortcut. 37 // Describes ARC app shortcut.
31 struct ShortcutInfo { 38 struct ShortcutInfo {
32 string name; 39 string name;
33 string package_name; 40 string package_name;
34 string icon_resource_id; 41 string icon_resource_id;
35 string intent_uri; 42 string intent_uri;
36 }; 43 };
37 44
38 // Page for ShowPackageInfoOnPage. 45 // Page for ShowPackageInfoOnPage.
39 [Extensible] 46 [Extensible]
40 enum ShowPackageInfoPage { 47 enum ShowPackageInfoPage {
41 // The main package info page. 48 // The main package info page.
42 MAIN = 0, 49 MAIN = 0,
43 50
44 // Page for managing links assigned to the app. 51 // Page for managing links assigned to the app.
45 MANAGE_LINKS = 1, 52 MANAGE_LINKS = 1,
46 }; 53 };
47 54
48 // Next method ID: 12 55 // Next method ID: 13
49 interface AppHost { 56 interface AppHost {
50 // Sends newly added ARC app to Chrome. This message is sent when ARC receives 57 // 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. 58 // package added notification. Multiple apps may be added in the one package.
52 [MinVersion=1] OnAppAdded@2(AppInfo app); 59 [MinVersion=1] OnAppAdded@2(AppInfo app);
53 60
54 // Receives an icon of required |scale_factor| for specific ARC app. The app 61 // 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 62 // is defined by |package_name| and |activity|. The icon content cannot be
56 // empty and must match to |scale_factor| assuming 48x48 for 63 // 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. 64 // SCALE_FACTOR_100P. |scale_factor| is an enum defined at ui/base/layout.h.
58 // |icon_png_data| is a png-encoded image. 65 // |icon_png_data| is a png-encoded image.
(...skipping 29 matching lines...) Expand all
88 95
89 // Notifies that task has been activated. 96 // Notifies that task has been activated.
90 [MinVersion=4] OnTaskSetActive@6(int32 task_id); 97 [MinVersion=4] OnTaskSetActive@6(int32 task_id);
91 98
92 // Notifies that notifications enabled settings in Android is changed. 99 // Notifies that notifications enabled settings in Android is changed.
93 [MinVersion=7] OnNotificationsEnabledChanged@7(string package_name, 100 [MinVersion=7] OnNotificationsEnabledChanged@7(string package_name,
94 bool enabled); 101 bool enabled);
95 102
96 // Notifies that an application shortcut needs to be created. 103 // Notifies that an application shortcut needs to be created.
97 [MinVersion=9] OnInstallShortcut@11(ShortcutInfo shortcut); 104 [MinVersion=9] OnInstallShortcut@11(ShortcutInfo shortcut);
105
106 // Notifies that task requested orientation lock.
107 [MinVersion=11] OnTaskOrientationLockRequested@12(int32 task_id,
108 OrientationLock lock);
98 }; 109 };
99 110
100 // TODO(lhchavez): Migrate all request/response messages to Mojo. 111 // TODO(lhchavez): Migrate all request/response messages to Mojo.
101 // Next method ID: 16 112 // Next method ID: 16
102 // Deprecated method ID: 9 113 // Deprecated method ID: 9
103 interface AppInstance { 114 interface AppInstance {
104 Init@0(AppHost host_ptr); 115 Init@0(AppHost host_ptr);
105 116
106 // Query if a given resolution can be handled by the application. Returns true 117 // Query if a given resolution can be handled by the application. Returns true
107 // if it can. 118 // if it can.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 ShowPackageInfoPage page, 175 ShowPackageInfoPage page,
165 ScreenRect dimension_on_screen); 176 ScreenRect dimension_on_screen);
166 177
167 // Sets notification setting for the package. 178 // Sets notification setting for the package.
168 [MinVersion=6] SetNotificationsEnabled@10(string package_name, bool enabled); 179 [MinVersion=6] SetNotificationsEnabled@10(string package_name, bool enabled);
169 180
170 // Sends a request to ARC to uninstall the given package. Error (if ever 181 // 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. 182 // happens) is ignored, and uninstall option should appear in the UI.
172 [MinVersion=2] UninstallPackage@5(string package_name); 183 [MinVersion=2] UninstallPackage@5(string package_name);
173 }; 184 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698