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

Side by Side Diff: sky/shell/java_service_provider.cc

Issue 962383003: Make shake-to-reload actually work (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sky/shell/java_service_provider.h" 5 #include "sky/shell/java_service_provider.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "jni/JavaServiceProvider_jni.h" 8 #include "jni/JavaServiceProvider_jni.h"
9 #include "mojo/public/cpp/bindings/interface_request.h"
9 10
10 namespace sky { 11 namespace sky {
11 namespace shell { 12 namespace shell {
12 13
13 bool RegisterJavaServiceProvider(JNIEnv* env) { 14 bool RegisterJavaServiceProvider(JNIEnv* env) {
14 return RegisterNativesImpl(env); 15 return RegisterNativesImpl(env);
15 } 16 }
16 17
17 mojo::ScopedMessagePipeHandle CreateJavaServiceProvider() { 18 void CreateJavaServiceProvider(
18 JNIEnv* env = base::android::AttachCurrentThread(); 19 mojo::InterfaceRequest<mojo::ServiceProvider> request) {
19 return mojo::ScopedMessagePipeHandle( 20 Java_JavaServiceProvider_create(
20 mojo::MessagePipeHandle(Java_JavaServiceProvider_create( 21 base::android::AttachCurrentThread(),
21 env, base::android::GetApplicationContext()))); 22 base::android::GetApplicationContext(),
23 request.PassMessagePipe().release().value());
22 } 24 }
23 25
24 } // namespace shell 26 } // namespace shell
25 } // namespace sky 27 } // namespace sky
OLDNEW
« no previous file with comments | « sky/shell/java_service_provider.h ('k') | sky/shell/org/domokit/sky/shell/JavaServiceProvider.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698