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

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

Issue 1123993002: Componentizes external_video_surface to reduce webview/Cast duplication. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: java DEPS, round 2 Created 5 years, 7 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
« no previous file with comments | « android_webview/lib/main/aw_main_delegate.cc ('k') | android_webview/native/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
OLDNEW
« no previous file with comments | « android_webview/lib/main/aw_main_delegate.cc ('k') | android_webview/native/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698