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

Side by Side Diff: shell/android/android_handler.cc

Issue 1926123002: Add a ctor for InterfaceRequest<I> that takes a ScopedMessagePipeHandle, and remove MakeRequest<I>(… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « services/ui/input_manager/input_associate.cc ('k') | shell/context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "shell/android/android_handler.h" 5 #include "shell/android/android_handler.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 26 matching lines...) Expand all
37 // This function loads the application library, sets the application context and 37 // This function loads the application library, sets the application context and
38 // thunks and calls into the application MojoMain. To ensure that the thunks are 38 // thunks and calls into the application MojoMain. To ensure that the thunks are
39 // set correctly we keep it in the Mojo shell .so and pass the function pointer 39 // set correctly we keep it in the Mojo shell .so and pass the function pointer
40 // to the helper libbootstrap.so. 40 // to the helper libbootstrap.so.
41 void RunAndroidApplication(JNIEnv* env, 41 void RunAndroidApplication(JNIEnv* env,
42 jobject j_context, 42 jobject j_context,
43 uintptr_t tracing_id, 43 uintptr_t tracing_id,
44 const base::FilePath& app_path, 44 const base::FilePath& app_path,
45 jint j_handle) { 45 jint j_handle) {
46 mojo::InterfaceRequest<mojo::Application> application_request = 46 mojo::InterfaceRequest<mojo::Application> application_request =
47 mojo::MakeRequest<mojo::Application>( 47 mojo::InterfaceRequest<mojo::Application>(
48 mojo::MakeScopedHandle(mojo::MessagePipeHandle(j_handle))); 48 mojo::MakeScopedHandle(mojo::MessagePipeHandle(j_handle)));
49 49
50 // Load the library, so that we can set the application context there if 50 // Load the library, so that we can set the application context there if
51 // needed. 51 // needed.
52 // TODO(vtl): We'd use a ScopedNativeLibrary, but it doesn't have .get()! 52 // TODO(vtl): We'd use a ScopedNativeLibrary, but it doesn't have .get()!
53 base::NativeLibrary app_library = LoadNativeApplication(app_path); 53 base::NativeLibrary app_library = LoadNativeApplication(app_path);
54 if (!app_library) 54 if (!app_library)
55 return; 55 return;
56 56
57 // Set the application context if needed. Most applications will need to 57 // Set the application context if needed. Most applications will need to
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 return ConvertUTF8ToJavaString(env, temporary_file.value()).Release(); 178 return ConvertUTF8ToJavaString(env, temporary_file.value()).Release();
179 } 179 }
180 } 180 }
181 } 181 }
182 182
183 bool RegisterAndroidHandlerJni(JNIEnv* env) { 183 bool RegisterAndroidHandlerJni(JNIEnv* env) {
184 return RegisterNativesImpl(env); 184 return RegisterNativesImpl(env);
185 } 185 }
186 186
187 } // namespace shell 187 } // namespace shell
OLDNEW
« no previous file with comments | « services/ui/input_manager/input_associate.cc ('k') | shell/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698