OLD | NEW |
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 <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/context_utils.h" |
8 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
9 #include "base/android/library_loader/library_loader_hooks.h" | 10 #include "base/android/library_loader/library_loader_hooks.h" |
10 #include "base/bind.h" | 11 #include "base/bind.h" |
11 #include "components/resource_provider/jni/Main_jni.h" | 12 #include "components/resource_provider/jni/Main_jni.h" |
12 #include "net/android/net_jni_registrar.h" | 13 #include "net/android/net_jni_registrar.h" |
13 | 14 |
14 namespace { | 15 namespace { |
15 bool RegisterJNI(JNIEnv* env) { | 16 bool RegisterJNI(JNIEnv* env) { |
16 return net::android::RegisterJni(env); | 17 return net::android::RegisterJni(env); |
17 } | 18 } |
(...skipping 26 matching lines...) Expand all Loading... |
44 return JNI_VERSION_1_4; | 45 return JNI_VERSION_1_4; |
45 } | 46 } |
46 | 47 |
47 extern "C" JNI_EXPORT void InitApplicationContext( | 48 extern "C" JNI_EXPORT void InitApplicationContext( |
48 const base::android::JavaRef<jobject>& context) { | 49 const base::android::JavaRef<jobject>& context) { |
49 JNIEnv* env = base::android::AttachCurrentThread(); | 50 JNIEnv* env = base::android::AttachCurrentThread(); |
50 base::android::InitApplicationContext(env, context); | 51 base::android::InitApplicationContext(env, context); |
51 resource_provider::Java_Main_init( | 52 resource_provider::Java_Main_init( |
52 env, base::android::GetApplicationContext()); | 53 env, base::android::GetApplicationContext()); |
53 } | 54 } |
OLD | NEW |