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

Unified Diff: android_webview/lib/main/webview_entry_point.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
« no previous file with comments | « android_webview/android_webview.gyp ('k') | android_webview/lib/main/webview_jni_onload.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/lib/main/webview_entry_point.cc
diff --git a/android_webview/lib/main/webview_entry_point.cc b/android_webview/lib/main/webview_entry_point.cc
index 7de575a6e1c8ab6ca99e18726c6dcfc0937537e8..44135b74fc5d34dae481769d2382691f5db04531 100644
--- a/android_webview/lib/main/webview_entry_point.cc
+++ b/android_webview/lib/main/webview_entry_point.cc
@@ -2,14 +2,17 @@
// 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"
jam 2015/02/20 06:37:37 nit: why not just inline these two methods in this
michaelbai 2015/02/20 17:00:17 These methods will be used by the monochrome's JNI
michaelbai 2015/02/20 17:06:15 or I will have android_webview::OnJNIOnLoadInit(),
Torne 2015/02/20 18:24:10 Yeah, we will almost certainly need to reuse these
#include "base/android/jni_android.h"
+#include "base/bind.h"
#include "content/public/app/content_jni_onload.h"
// This is called by the VM when the shared library is first loaded.
// Most of the initialization is done in LibraryLoadedOnMainThread(), not here.
JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
- if (!android_webview::OnJNIOnLoad(vm))
+ if (!content::android::OnJNIOnLoadRegisterJNI(
+ vm, base::Bind(&android_webview::RegisterJNI)) ||
+ !content::android::OnJNIOnLoadInit(base::Bind(&android_webview::Init)))
return -1;
return JNI_VERSION_1_4;
« no previous file with comments | « android_webview/android_webview.gyp ('k') | android_webview/lib/main/webview_jni_onload.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698