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

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

Issue 11823046: Move content/components/web_contents_delegate_android to components/web_contents_delegate_android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (win7_aura so slow!!) Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « android_webview/lib/DEPS ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/aw_main_delegate.h" 5 #include "android_webview/lib/main/aw_main_delegate.h"
6 #include "android_webview/native/android_webview_jni_registrar.h" 6 #include "android_webview/native/android_webview_jni_registrar.h"
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_registrar.h"
9 #include "components/web_contents_delegate_android/component_jni_registrar.h"
10 #include "content/components/navigation_interception/component_jni_registrar.h"
8 #include "content/public/app/android_library_loader_hooks.h" 11 #include "content/public/app/android_library_loader_hooks.h"
9 #include "content/public/app/content_main.h" 12 #include "content/public/app/content_main.h"
10 13
14 static base::android::RegistrationMethod
15 kWebViewDependencyRegisteredMethods[] = {
16 { "NavigationInterception", content::RegisterNavigationInterceptionJni },
17 { "WebContentsDelegateAndroid",
18 components::RegisterWebContentsDelegateAndroidJni },
19 };
20
11 // This is called by the VM when the shared library is first loaded. 21 // This is called by the VM when the shared library is first loaded.
12 // Most of the initialization is done in LibraryLoadedOnMainThread(), not here. 22 // Most of the initialization is done in LibraryLoadedOnMainThread(), not here.
13 JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) { 23 JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
14 base::android::InitVM(vm); 24 base::android::InitVM(vm);
15 JNIEnv* env = base::android::AttachCurrentThread(); 25 JNIEnv* env = base::android::AttachCurrentThread();
16 if (!content::RegisterLibraryLoaderEntryHook(env)) 26 if (!content::RegisterLibraryLoaderEntryHook(env))
17 return -1; 27 return -1;
18 28
29 // Register JNI for components we depend on.
30 if (!RegisterNativeMethods(
31 env,
32 kWebViewDependencyRegisteredMethods,
33 arraysize(kWebViewDependencyRegisteredMethods)))
34 return -1;
35
19 if (!android_webview::RegisterJni(env)) 36 if (!android_webview::RegisterJni(env))
20 return -1; 37 return -1;
21 38
22 content::SetContentMainDelegate(new android_webview::AwMainDelegate()); 39 content::SetContentMainDelegate(new android_webview::AwMainDelegate());
23 40
24 return JNI_VERSION_1_4; 41 return JNI_VERSION_1_4;
25 } 42 }
OLDNEW
« no previous file with comments | « android_webview/lib/DEPS ('k') | android_webview/native/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698