OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 module arc; | |
6 | |
7 // Duplicates ui::ScaleFactor enum in order to be accessible on Android side. | |
8 enum ScaleFactor { | |
9 SCALE_FACTOR_NONE = 0, | |
hidehiko
2015/12/16 18:34:03
nit: maybe it's time to remove the common prefix a
| |
10 SCALE_FACTOR_100P, | |
11 SCALE_FACTOR_125P, | |
12 SCALE_FACTOR_133P, | |
13 SCALE_FACTOR_140P, | |
14 SCALE_FACTOR_150P, | |
15 SCALE_FACTOR_180P, | |
16 SCALE_FACTOR_200P, | |
17 SCALE_FACTOR_250P, | |
18 SCALE_FACTOR_300P, | |
19 | |
20 NUM_SCALE_FACTORS | |
21 }; | |
22 | |
23 // Describes ARC app. | |
24 struct AppInfo { | |
25 string name; | |
26 string package; | |
27 string activity; | |
28 }; | |
29 | |
30 interface AppHost { | |
31 // Receives a list of available ARC apps to Chrome. Members of AppInfo must | |
32 // contain non-empty string. | |
33 OnAppListRefreshed(array<AppInfo> apps); | |
34 | |
35 // Receives an icon of required |scale_factor| for specific ARC app. The app | |
36 // is defined by |package| and |activity|. The icon content cannot be empty | |
37 // and must match to |scale_factor| assuming 48x48 for SCALE_FACTOR_100P. | |
38 // |scale_factor| is an enum defined at ui/base/layout.h. |icon_png_data| is | |
39 // a png-encoded image. | |
40 OnAppIcon(string package, string activity, | |
41 ScaleFactor scale_factor, array<uint8> icon_png_data); | |
42 }; | |
43 | |
44 // TODO(lhchavez): Migrate all request/response messages to Mojo. | |
hidehiko
2015/12/16 18:34:03
You've done already?
Luis Héctor Chávez
2015/12/16 19:09:49
What I want to be able to do is to change the meth
| |
45 interface AppInstance { | |
46 Init(AppHost host_ptr); | |
47 | |
48 // Sends a request to ARC to launch an ARC app defined by |package| and | |
49 // |activity|, which cannot be empty. | |
50 LaunchApp(string package, string activity); | |
51 | |
52 // Sends a request to ARC to refresh a list of ARC apps. | |
53 // OnRefreshAppsList is expected in response to this message. However, | |
54 // response may not be sent if ARC is not ready yet (boot completed event is | |
55 // not received). | |
56 RefreshAppList(); | |
57 | |
58 // Sends a request to ARC for the ARC app icon of a required scale factor. | |
59 // Scale factor is an enum defined at ui/base/layout.h. App is defined by | |
60 // package and activity, which cannot be empty. | |
61 RequestAppIcon(string package, string activity, ScaleFactor scale_factor); | |
62 }; | |
OLD | NEW |