| OLD | NEW |
| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/android/base_jni_onload.h" | 7 #include "base/android/base_jni_onload.h" |
| 8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
| 9 #include "base/android/library_loader/library_loader_hooks.h" | 9 #include "base/android/library_loader/library_loader_hooks.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "mojo/services/html_viewer/jni/Main_jni.h" | 11 #include "components/html_viewer/jni/Main_jni.h" |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 bool RegisterJNI(JNIEnv* env) { | 14 bool RegisterJNI(JNIEnv* env) { |
| 15 return true; | 15 return true; |
| 16 } | 16 } |
| 17 | 17 |
| 18 bool Init() { | 18 bool Init() { |
| 19 Java_Main_init(base::android::AttachCurrentThread(), | 19 Java_Main_init(base::android::AttachCurrentThread(), |
| 20 base::android::GetApplicationContext()); | 20 base::android::GetApplicationContext()); |
| 21 return true; | 21 return true; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 41 base::android::LibraryLoaderExitHook(); | 41 base::android::LibraryLoaderExitHook(); |
| 42 | 42 |
| 43 return JNI_VERSION_1_4; | 43 return JNI_VERSION_1_4; |
| 44 } | 44 } |
| 45 | 45 |
| 46 extern "C" JNI_EXPORT void InitApplicationContext( | 46 extern "C" JNI_EXPORT void InitApplicationContext( |
| 47 const base::android::JavaRef<jobject>& context) { | 47 const base::android::JavaRef<jobject>& context) { |
| 48 JNIEnv* env = base::android::AttachCurrentThread(); | 48 JNIEnv* env = base::android::AttachCurrentThread(); |
| 49 base::android::InitApplicationContext(env, context); | 49 base::android::InitApplicationContext(env, context); |
| 50 } | 50 } |
| OLD | NEW |