| 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 "content/public/app/content_jni_onload.h" | 5 #include "content/public/app/content_jni_onload.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/jni_android.h" | 10 #include "base/android/jni_android.h" |
| 11 #include "base/android/library_loader/library_loader_hooks.h" | 11 #include "base/android/library_loader/library_loader_hooks.h" |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "content/app/android/library_loader_hooks.h" | 13 #include "content/app/android/library_loader_hooks.h" |
| 14 #include "content/public/app/content_main.h" | 14 #include "content/public/app/content_main.h" |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 namespace android { | 17 namespace android { |
| 18 | 18 |
| 19 bool OnJNIOnLoadRegisterJNI(JNIEnv* env) { | 19 bool OnJNIOnLoadRegisterJNI(JNIEnv* env) { |
| 20 if (!base::android::OnJNIOnLoadRegisterJNI(env)) | |
| 21 return false; | |
| 22 | |
| 23 return content::EnsureJniRegistered(env); | 20 return content::EnsureJniRegistered(env); |
| 24 } | 21 } |
| 25 | 22 |
| 26 bool OnJNIOnLoadInit() { | 23 bool OnJNIOnLoadInit() { |
| 27 if (!base::android::OnJNIOnLoadInit()) | 24 if (!base::android::OnJNIOnLoadInit()) |
| 28 return false; | 25 return false; |
| 29 | 26 |
| 30 base::android::SetLibraryLoadedHook(&content::LibraryLoaded); | 27 base::android::SetLibraryLoadedHook(&content::LibraryLoaded); |
| 31 return true; | 28 return true; |
| 32 } | 29 } |
| 33 | 30 |
| 34 } // namespace android | 31 } // namespace android |
| 35 } // namespace content | 32 } // namespace content |
| OLD | NEW |