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

Side by Side Diff: android_webview/lib/main/webview_jni_onload.cc

Issue 2146753002: Android: Remove unneeded RegisterNatives() calls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android: Don't require RegisterNatives if there are none Created 4 years, 4 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
OLDNEW
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 "android_webview/lib/main/webview_jni_onload.h" 5 #include "android_webview/lib/main/webview_jni_onload.h"
6 6
7 #include "android_webview/common/aw_version_info_values.h" 7 #include "android_webview/common/aw_version_info_values.h"
8 #include "android_webview/lib/main/aw_main_delegate.h" 8 #include "android_webview/lib/main/aw_main_delegate.h"
9 #include "android_webview/native/android_webview_jni_registrar.h" 9 #include "android_webview/native/android_webview_jni_registrar.h"
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
11 #include "base/android/jni_registrar.h" 11 #include "base/android/jni_registrar.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 "components/external_video_surface/component_jni_registrar.h" 14 #include "components/external_video_surface/component_jni_registrar.h"
15 #include "components/navigation_interception/component_jni_registrar.h"
16 #include "components/web_contents_delegate_android/component_jni_registrar.h" 15 #include "components/web_contents_delegate_android/component_jni_registrar.h"
17 #include "content/public/app/content_jni_onload.h" 16 #include "content/public/app/content_jni_onload.h"
18 #include "content/public/app/content_main.h" 17 #include "content/public/app/content_main.h"
19 #include "url/url_util.h" 18 #include "url/url_util.h"
20 19
21 namespace android_webview { 20 namespace android_webview {
22 21
23 namespace { 22 namespace {
24 23
25 static base::android::RegistrationMethod 24 static base::android::RegistrationMethod
26 kWebViewDependencyRegisteredMethods[] = { 25 kWebViewDependencyRegisteredMethods[] = {
27 #if defined(VIDEO_HOLE) 26 #if defined(VIDEO_HOLE)
28 { "ExternalVideoSurfaceContainer", 27 { "ExternalVideoSurfaceContainer",
29 external_video_surface::RegisterExternalVideoSurfaceJni }, 28 external_video_surface::RegisterExternalVideoSurfaceJni },
30 #endif 29 #endif
31 { "NavigationInterception",
32 navigation_interception::RegisterNavigationInterceptionJni },
33 { "WebContentsDelegateAndroid", 30 { "WebContentsDelegateAndroid",
34 web_contents_delegate_android::RegisterWebContentsDelegateAndroidJni }, 31 web_contents_delegate_android::RegisterWebContentsDelegateAndroidJni },
35 }; 32 };
36 33
37 bool RegisterJNI(JNIEnv* env) { 34 bool RegisterJNI(JNIEnv* env) {
38 // Register JNI for components we depend on. 35 // Register JNI for components we depend on.
39 if (!RegisterNativeMethods( 36 if (!RegisterNativeMethods(
40 env, 37 env,
41 kWebViewDependencyRegisteredMethods, 38 kWebViewDependencyRegisteredMethods,
42 arraysize(kWebViewDependencyRegisteredMethods)) || 39 arraysize(kWebViewDependencyRegisteredMethods)) ||
(...skipping 22 matching lines...) Expand all
65 return content::android::OnJNIOnLoadRegisterJNI(vm, register_callbacks); 62 return content::android::OnJNIOnLoadRegisterJNI(vm, register_callbacks);
66 } 63 }
67 64
68 bool OnJNIOnLoadInit() { 65 bool OnJNIOnLoadInit() {
69 std::vector<base::android::InitCallback> init_callbacks; 66 std::vector<base::android::InitCallback> init_callbacks;
70 init_callbacks.push_back(base::Bind(&Init)); 67 init_callbacks.push_back(base::Bind(&Init));
71 return content::android::OnJNIOnLoadInit(init_callbacks); 68 return content::android::OnJNIOnLoadInit(init_callbacks);
72 } 69 }
73 70
74 } // android_webview 71 } // android_webview
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/accessibility_util.h » ('j') | net/android/cellular_signal_strength.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698