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

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

Issue 2056563002: Roll base to 0032c8e1a72eb85d947d8df8de503caa62b4d0a8. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 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 | « shell/android/android_handler.cc ('k') | shell/android/main.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 "base/android/jni_android.h" 5 #include "base/android/jni_android.h"
6 #include "base/android/jni_string.h" 6 #include "base/android/jni_string.h"
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "jni/Bootstrap_jni.h" 8 #include "jni/Bootstrap_jni.h"
9 #include "shell/android/run_android_application_function.h" 9 #include "shell/android/run_android_application_function.h"
10 10
11 namespace shell { 11 namespace shell {
12 12
13 void Bootstrap(JNIEnv* env, 13 void Bootstrap(JNIEnv* env,
14 jobject, 14 const JavaParamRef<jobject>&,
15 jobject j_context, 15 const JavaParamRef<jobject>& j_context,
16 jlong j_id, 16 jlong j_id,
17 jstring j_native_library_path, 17 const JavaParamRef<jstring>& j_native_library_path,
18 jint j_handle, 18 jint j_handle,
19 jlong j_run_application_ptr) { 19 jlong j_run_application_ptr) {
20 base::FilePath app_path( 20 base::FilePath app_path(
21 base::android::ConvertJavaStringToUTF8(env, j_native_library_path)); 21 base::android::ConvertJavaStringToUTF8(env, j_native_library_path));
22 RunAndroidApplicationFn run_android_application_fn = 22 RunAndroidApplicationFn run_android_application_fn =
23 reinterpret_cast<RunAndroidApplicationFn>(j_run_application_ptr); 23 reinterpret_cast<RunAndroidApplicationFn>(j_run_application_ptr);
24 run_android_application_fn(env, j_context, j_id, app_path, j_handle); 24 run_android_application_fn(env, j_context, j_id, app_path, j_handle);
25 } 25 }
26 26
27 bool RegisterBootstrapJni(JNIEnv* env) { 27 bool RegisterBootstrapJni(JNIEnv* env) {
28 return RegisterNativesImpl(env); 28 return RegisterNativesImpl(env);
29 } 29 }
30 30
31 } // namespace shell 31 } // namespace shell
32 32
33 JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) { 33 JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
34 base::android::InitVM(vm); 34 base::android::InitVM(vm);
35 JNIEnv* env = base::android::AttachCurrentThread(); 35 JNIEnv* env = base::android::AttachCurrentThread();
36 36
37 if (!shell::RegisterBootstrapJni(env)) 37 if (!shell::RegisterBootstrapJni(env))
38 return -1; 38 return -1;
39 39
40 return JNI_VERSION_1_4; 40 return JNI_VERSION_1_4;
41 } 41 }
OLDNEW
« no previous file with comments | « shell/android/android_handler.cc ('k') | shell/android/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698