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

Unified Diff: sky/framework/shell.dart

Issue 962043002: Expose Android sensors to via Mojo services (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Review comments Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/shell/sensor.sky ('k') | sky/services/oknet/src/org/domokit/oknet/NetworkServiceImpl.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/shell.dart
diff --git a/sky/framework/shell.dart b/sky/framework/shell.dart
new file mode 100644
index 0000000000000000000000000000000000000000..df8f49591d29c7b3f6a17c5a28fcc7f2d8fdefe2
--- /dev/null
+++ b/sky/framework/shell.dart
@@ -0,0 +1,23 @@
+// 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.
+
+import "/mojo/public/dart/application.dart";
+import "dart:sky.internals" as internals;
+import "mojo:core" as core;
+import "package:mojo/public/interfaces/application/service_provider.mojom.dart";
+
+ApplicationConnection _initConnection() {
+ int rawHandle = internals.takeServicesProvidedByEmbedder();
+ core.MojoHandle proxyHandle = new core.MojoHandle(rawHandle);
+ ServiceProviderProxy serviceProvider = null;
+ if (proxyHandle.isValid)
+ serviceProvider = new ServiceProviderProxy.fromHandle(proxyHandle);
+ return new ApplicationConnection(null, serviceProvider);
+}
+
+final ApplicationConnection _connection = _initConnection();
+
+void requestService(Object proxy) {
+ _connection.requestService(proxy);
+}
« no previous file with comments | « sky/examples/shell/sensor.sky ('k') | sky/services/oknet/src/org/domokit/oknet/NetworkServiceImpl.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698