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

Side by Side Diff: mojo/services/android/interfaces/activity.mojom

Issue 1468913003: Add android.mojo application. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 5 years 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
« no previous file with comments | « mojo/services/android/interfaces/BUILD.gn ('k') | mojo/services/mojo_services.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 // This file has been imported from
6 // https://github.com/flutter/engine/blob/master/sky/services/activity/activity. mojom
7 [DartPackage="mojo_services"]
8 module activity;
9
10 struct StringExtra {
11 string name;
12 string value;
13 };
14
15 struct ComponentName {
16 string package_name;
17 string class_name;
18 };
19
20 struct Intent {
21 string action;
22 string url;
23 uint32 flags;
24 ComponentName? component;
25 array<StringExtra>? string_extras;
26 string? type;
27 };
28
29 struct TaskDescription {
30 string? label;
31 uint32 primaryColor;
32 };
33
34 enum SystemUIVisibility {
35 STANDARD,
36 FULLSCREEN,
37 IMMERSIVE,
38 };
39
40 // See http://developer.android.com/intl/es/reference/android/R.attr.html#screen Orientation
41 enum ScreenOrientation {
42 UNSPECIFIED,
43 LANDSCAPE,
44 PORTRAIT,
45 NOSENSOR,
46 };
47
48 // TODO(abarth): This interface seems very specific to Android. Do we want to
49 // have a higher-level abstraction here? Do we want a collection
50 // of services that only work on specific platforms? We need to
51 // figure out how to rationalize this interface across platforms.
52 [ServiceName="activity::Activity"]
53 interface Activity {
54 GetUserFeedback(UserFeedback& user_feedback);
55
56 StartActivity(Intent intent);
57 FinishCurrentActivity();
58 SetTaskDescription(TaskDescription description);
59 SetSystemUIVisibility(SystemUIVisibility visibility);
60 SetRequestedOrientation(ScreenOrientation orientation);
61 };
62
63 [ServiceName="activity::PathService"]
64 interface PathService {
65 // Where the application files are.
66 GetAppDataDir() => (string path);
67
68 // Where to store long-term files.
69 GetFilesDir() => (string path);
70
71 // Where to store short-term files.
72 GetCacheDir() => (string path);
73 };
74
75 enum HapticFeedbackType {
76 LONG_PRESS,
77 VIRTUAL_KEY,
78 KEYBOARD_TAP,
79 CLOCK_TICK,
80 };
81
82 enum AuralFeedbackType {
83 CLICK,
84 NAVIGATION_LEFT,
85 NAVIGATION_UP,
86 NAVIGATION_RIGHT,
87 NAVIGATION_DOWN,
88 };
89
90 interface UserFeedback {
91 PerformHapticFeedback(HapticFeedbackType type);
92 PerformAuralFeedback(AuralFeedbackType type);
93 };
OLDNEW
« no previous file with comments | « mojo/services/android/interfaces/BUILD.gn ('k') | mojo/services/mojo_services.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698