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

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

Issue 962383003: Make shake-to-reload actually work (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/java_service_provider.cc ('k') | sky/shell/shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/shell/org/domokit/sky/shell/JavaServiceProvider.java
diff --git a/sky/shell/org/domokit/sky/shell/JavaServiceProvider.java b/sky/shell/org/domokit/sky/shell/JavaServiceProvider.java
index 05fefbe16e038398bfdc5f01641aba2496b5b156..bda18c83fb39c4b3012b96107640781a501bcb5e 100644
--- a/sky/shell/org/domokit/sky/shell/JavaServiceProvider.java
+++ b/sky/shell/org/domokit/sky/shell/JavaServiceProvider.java
@@ -11,7 +11,6 @@ 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;
@@ -29,11 +28,10 @@ public class JavaServiceProvider implements ServiceProvider {
@SuppressWarnings("unused")
@CalledByNative
- public static int create(Context context) {
+ public static void create(Context context, int nativeHandle) {
Core core = CoreImpl.getInstance();
- Pair<MessagePipeHandle, MessagePipeHandle> messagePipe = core.createMessagePipe(null);
- ServiceProvider.MANAGER.bind(new JavaServiceProvider(core, context), messagePipe.first);
- return messagePipe.second.releaseNativeHandle();
+ MessagePipeHandle pipe = core.acquireNativeHandle(nativeHandle).toMessagePipeHandle();
+ ServiceProvider.MANAGER.bind(new JavaServiceProvider(core, context), pipe);
}
public JavaServiceProvider(Core core, Context context) {
« no previous file with comments | « sky/shell/java_service_provider.cc ('k') | sky/shell/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698