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 "blimp/client/app/android/blimp_library_loader.h" | 5 #include "blimp/client/app/android/blimp_library_loader.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/android/base_jni_onload.h" | 9 #include "base/android/base_jni_onload.h" |
10 #include "base/android/base_jni_registrar.h" | 10 #include "base/android/base_jni_registrar.h" |
11 #include "base/android/jni_android.h" | 11 #include "base/android/jni_android.h" |
12 #include "base/android/library_loader/library_loader_hooks.h" | 12 #include "base/android/library_loader/library_loader_hooks.h" |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "blimp/client/app/android/blimp_app_jni_registrar.h" | 15 #include "blimp/client/app/android/blimp_app_jni_registrar.h" |
16 #include "blimp/client/app/blimp_startup.h" | 16 #include "blimp/client/app/blimp_startup.h" |
17 #include "blimp/client/public/android/blimp_jni_registrar.h" | 17 #include "blimp/client/public/android/blimp_jni_registrar.h" |
18 #include "jni/BlimpLibraryLoader_jni.h" | 18 #include "jni/BlimpLibraryLoader_jni.h" |
19 #include "net/android/net_jni_registrar.h" | 19 #include "net/android/net_jni_registrar.h" |
20 #include "ui/gl/gl_surface.h" | 20 #include "ui/gl/gl_surface.h" |
21 | 21 |
| 22 using base::android::JavaParamRef; |
| 23 |
22 namespace { | 24 namespace { |
23 | 25 |
24 bool OnLibrariesLoaded(JNIEnv* env, jclass clazz) { | 26 bool OnLibrariesLoaded(JNIEnv* env, jclass clazz) { |
25 blimp::client::InitializeLogging(); | 27 blimp::client::InitializeLogging(); |
26 return true; | 28 return true; |
27 } | 29 } |
28 | 30 |
29 bool OnJniInitializationComplete() { | 31 bool OnJniInitializationComplete() { |
30 base::android::SetLibraryLoadedHook(&OnLibrariesLoaded); | 32 base::android::SetLibraryLoadedHook(&OnLibrariesLoaded); |
31 return true; | 33 return true; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 // Although we only need to register JNI for base/ and blimp/, this follows | 80 // Although we only need to register JNI for base/ and blimp/, this follows |
79 // the general Chrome for Android pattern, to be future-proof against future | 81 // the general Chrome for Android pattern, to be future-proof against future |
80 // changes to JNI. | 82 // changes to JNI. |
81 if (!base::android::OnJNIOnLoadRegisterJNI(vm, register_callbacks) || | 83 if (!base::android::OnJNIOnLoadRegisterJNI(vm, register_callbacks) || |
82 !base::android::OnJNIOnLoadInit(init_callbacks)) { | 84 !base::android::OnJNIOnLoadInit(init_callbacks)) { |
83 return -1; | 85 return -1; |
84 } | 86 } |
85 | 87 |
86 return JNI_VERSION_1_4; | 88 return JNI_VERSION_1_4; |
87 } | 89 } |
OLD | NEW |