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

Unified Diff: android_webview/lib/main/webview_jni_onload.cc

Issue 935413004: Separate OnJNIOnLoad (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/lib/main/webview_jni_onload.cc
diff --git a/android_webview/lib/main/webview_jni_onload_delegate.cc b/android_webview/lib/main/webview_jni_onload.cc
similarity index 84%
rename from android_webview/lib/main/webview_jni_onload_delegate.cc
rename to android_webview/lib/main/webview_jni_onload.cc
index 5b1d1c7b7f204f74a2d9ae9969b8016d42e23176..c8a3f55d93c82b67d3b3f4841526a6d2313800c6 100644
--- a/android_webview/lib/main/webview_jni_onload_delegate.cc
+++ b/android_webview/lib/main/webview_jni_onload.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "android_webview/lib/main/webview_jni_onload_delegate.h"
+#include "android_webview/lib/main/webview_jni_onload.h"
#include "android_webview/lib/main/aw_main_delegate.h"
#include "android_webview/native/android_webview_jni_registrar.h"
@@ -11,7 +11,6 @@
#include "base/android/jni_utils.h"
#include "components/navigation_interception/component_jni_registrar.h"
#include "components/web_contents_delegate_android/component_jni_registrar.h"
-#include "content/public/app/content_jni_onload.h"
#include "content/public/app/content_main.h"
#include "url/url_util.h"
@@ -29,7 +28,7 @@ static base::android::RegistrationMethod
} // namespace
-bool WebViewJNIOnLoadDelegate::RegisterJNI(JNIEnv* env) {
+bool RegisterJNI(JNIEnv* env) {
// Register JNI for components we depend on.
if (!RegisterNativeMethods(
env,
@@ -41,7 +40,7 @@ bool WebViewJNIOnLoadDelegate::RegisterJNI(JNIEnv* env) {
return true;
}
-bool WebViewJNIOnLoadDelegate::Init() {
+bool Init() {
JNIEnv* env = base::android::AttachCurrentThread();
base::android::InitReplacementClassLoader(env,
base::android::GetClassLoader(env));
@@ -55,9 +54,4 @@ bool WebViewJNIOnLoadDelegate::Init() {
return true;
}
-bool OnJNIOnLoad(JavaVM* vm) {
- WebViewJNIOnLoadDelegate delegate;
- return content::android::OnJNIOnLoad(vm, &delegate);
-}
-
} // android_webview

Powered by Google App Engine
This is Rietveld 408576698