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

Unified 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, 1 month 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/android/interfaces/activity.mojom
diff --git a/mojo/services/android/interfaces/activity.mojom b/mojo/services/android/interfaces/activity.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..370cfe05a145156934a4c783c3bb990ea2be66a0
--- /dev/null
+++ b/mojo/services/android/interfaces/activity.mojom
@@ -0,0 +1,93 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file has been imported from
+// https://github.com/flutter/engine/blob/master/sky/services/activity/activity.mojom
+[DartPackage="mojo_services"]
+module activity;
+
+struct StringExtra {
+ string name;
+ string value;
+};
+
+struct ComponentName {
+ string package_name;
+ string class_name;
+};
+
+struct Intent {
+ string action;
+ string url;
+ uint32 flags;
+ ComponentName? component;
+ array<StringExtra>? string_extras;
+ string? type;
+};
+
+struct TaskDescription {
+ string? label;
+ uint32 primaryColor;
+};
+
+enum SystemUIVisibility {
+ STANDARD,
+ FULLSCREEN,
+ IMMERSIVE,
+};
+
+// See http://developer.android.com/intl/es/reference/android/R.attr.html#screenOrientation
+enum ScreenOrientation {
+ UNSPECIFIED,
+ LANDSCAPE,
+ PORTRAIT,
+ NOSENSOR,
+};
+
+// TODO(abarth): This interface seems very specific to Android. Do we want to
+// have a higher-level abstraction here? Do we want a collection
+// of services that only work on specific platforms? We need to
+// figure out how to rationalize this interface across platforms.
+[ServiceName="activity::Activity"]
+interface Activity {
+ GetUserFeedback(UserFeedback& user_feedback);
+
+ StartActivity(Intent intent);
+ FinishCurrentActivity();
+ SetTaskDescription(TaskDescription description);
+ SetSystemUIVisibility(SystemUIVisibility visibility);
+ SetRequestedOrientation(ScreenOrientation orientation);
+};
+
+[ServiceName="activity::PathService"]
+interface PathService {
+ // Where the application files are.
+ GetAppDataDir() => (string path);
+
+ // Where to store long-term files.
+ GetFilesDir() => (string path);
+
+ // Where to store short-term files.
+ GetCacheDir() => (string path);
+};
+
+enum HapticFeedbackType {
+ LONG_PRESS,
+ VIRTUAL_KEY,
+ KEYBOARD_TAP,
+ CLOCK_TICK,
+};
+
+enum AuralFeedbackType {
+ CLICK,
+ NAVIGATION_LEFT,
+ NAVIGATION_UP,
+ NAVIGATION_RIGHT,
+ NAVIGATION_DOWN,
+};
+
+interface UserFeedback {
+ PerformHapticFeedback(HapticFeedbackType type);
+ PerformAuralFeedback(AuralFeedbackType type);
+};
« 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