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

Unified Diff: sky/shell/apk/src/org/domokit/sky/shell/JavaServiceProvider.java

Issue 965493002: Introduce Stocks.apk (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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/shell/apk/res/values/strings.xml ('k') | sky/shell/apk/src/org/domokit/sky/shell/PlatformView.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/shell/apk/src/org/domokit/sky/shell/JavaServiceProvider.java
diff --git a/sky/shell/apk/src/org/domokit/sky/shell/JavaServiceProvider.java b/sky/shell/apk/src/org/domokit/sky/shell/JavaServiceProvider.java
deleted file mode 100644
index ad1b0b2695883a2e0ec0a45757769775d598baba..0000000000000000000000000000000000000000
--- a/sky/shell/apk/src/org/domokit/sky/shell/JavaServiceProvider.java
+++ /dev/null
@@ -1,53 +0,0 @@
-// 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.
-
-package org.domokit.sky.shell;
-
-import org.chromium.base.CalledByNative;
-import org.chromium.base.JNINamespace;
-import org.chromium.mojo.system.Core;
-import org.chromium.mojo.system.MessagePipeHandle;
-import org.chromium.mojo.system.MojoException;
-import org.chromium.mojo.system.Pair;
-import org.chromium.mojo.system.impl.CoreImpl;
-import org.chromium.mojom.mojo.NetworkService;
-import org.chromium.mojom.mojo.ServiceProvider;
-import org.domokit.oknet.NetworkServiceImpl;
-
-/**
- * A class to intialize the network.
- **/
-@JNINamespace("sky::shell")
-public class JavaServiceProvider implements ServiceProvider {
- private Core mCore;
-
- @SuppressWarnings("unused")
- @CalledByNative
- public static int create() {
- Core core = CoreImpl.getInstance();
- Pair<MessagePipeHandle, MessagePipeHandle> messagePipe = core.createMessagePipe(null);
- ServiceProvider.MANAGER.bind(new JavaServiceProvider(core), messagePipe.first);
- return messagePipe.second.releaseNativeHandle();
- }
-
- public JavaServiceProvider(Core core) {
- assert core != null;
- mCore = core;
- }
-
- @Override
- public void close() {}
-
- @Override
- public void onConnectionError(MojoException e) {}
-
- @Override
- public void connectToService(String interfaceName, MessagePipeHandle pipe) {
- if (interfaceName.equals(NetworkService.MANAGER.getName())) {
- NetworkService.MANAGER.bind(new NetworkServiceImpl(mCore), pipe);
- return;
- }
- pipe.close();
- }
-}
« no previous file with comments | « sky/shell/apk/res/values/strings.xml ('k') | sky/shell/apk/src/org/domokit/sky/shell/PlatformView.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698