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 "android_webview/lib/main/webview_jni_onload.h" | 5 #include "android_webview/lib/main/webview_jni_onload.h" |
6 | 6 |
7 #include "android_webview/lib/main/aw_main_delegate.h" | 7 #include "android_webview/lib/main/aw_main_delegate.h" |
8 #include "android_webview/native/android_webview_jni_registrar.h" | 8 #include "android_webview/native/android_webview_jni_registrar.h" |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_registrar.h" | 10 #include "base/android/jni_registrar.h" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "components/external_video_surface/component_jni_registrar.h" |
12 #include "components/navigation_interception/component_jni_registrar.h" | 13 #include "components/navigation_interception/component_jni_registrar.h" |
13 #include "components/web_contents_delegate_android/component_jni_registrar.h" | 14 #include "components/web_contents_delegate_android/component_jni_registrar.h" |
14 #include "content/public/app/content_jni_onload.h" | 15 #include "content/public/app/content_jni_onload.h" |
15 #include "content/public/app/content_main.h" | 16 #include "content/public/app/content_main.h" |
16 #include "url/url_util.h" | 17 #include "url/url_util.h" |
17 | 18 |
18 namespace android_webview { | 19 namespace android_webview { |
19 | 20 |
20 namespace { | 21 namespace { |
21 | 22 |
22 static base::android::RegistrationMethod | 23 static base::android::RegistrationMethod |
23 kWebViewDependencyRegisteredMethods[] = { | 24 kWebViewDependencyRegisteredMethods[] = { |
| 25 #if defined(VIDEO_HOLE) |
| 26 { "ExternalVideoSurfaceContainer", |
| 27 external_video_surface::RegisterExternalVideoSurfaceJni }, |
| 28 #endif |
24 { "NavigationInterception", | 29 { "NavigationInterception", |
25 navigation_interception::RegisterNavigationInterceptionJni }, | 30 navigation_interception::RegisterNavigationInterceptionJni }, |
26 { "WebContentsDelegateAndroid", | 31 { "WebContentsDelegateAndroid", |
27 web_contents_delegate_android::RegisterWebContentsDelegateAndroidJni }, | 32 web_contents_delegate_android::RegisterWebContentsDelegateAndroidJni }, |
28 }; | 33 }; |
29 | 34 |
30 bool RegisterJNI(JNIEnv* env) { | 35 bool RegisterJNI(JNIEnv* env) { |
31 // Register JNI for components we depend on. | 36 // Register JNI for components we depend on. |
32 if (!RegisterNativeMethods( | 37 if (!RegisterNativeMethods( |
33 env, | 38 env, |
(...skipping 23 matching lines...) Expand all Loading... |
57 return content::android::OnJNIOnLoadRegisterJNI(vm, register_callbacks); | 62 return content::android::OnJNIOnLoadRegisterJNI(vm, register_callbacks); |
58 } | 63 } |
59 | 64 |
60 bool OnJNIOnLoadInit() { | 65 bool OnJNIOnLoadInit() { |
61 std::vector<base::android::InitCallback> init_callbacks; | 66 std::vector<base::android::InitCallback> init_callbacks; |
62 init_callbacks.push_back(base::Bind(&Init)); | 67 init_callbacks.push_back(base::Bind(&Init)); |
63 return content::android::OnJNIOnLoadInit(init_callbacks); | 68 return content::android::OnJNIOnLoadInit(init_callbacks); |
64 } | 69 } |
65 | 70 |
66 } // android_webview | 71 } // android_webview |
OLD | NEW |