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

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

Issue 10941015: [Android] Upstream the WebView find-in-page API implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit fixes. Created 8 years, 3 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_entry_point.cc
diff --git a/android_webview/lib/main/webview_entry_point.cc b/android_webview/lib/main/webview_entry_point.cc
index 567161edcecc4303492a23f27f1fb679466ecbcc..8a4996fe7069d0dce29fd3bb69479f8d29e92721 100644
--- a/android_webview/lib/main/webview_entry_point.cc
+++ b/android_webview/lib/main/webview_entry_point.cc
@@ -5,8 +5,10 @@
#include "android_webview/lib/main/aw_main_delegate.h"
#include "android_webview/native/android_webview_jni_registrar.h"
#include "base/android/jni_android.h"
+#include "base/command_line.h"
#include "content/public/app/android_library_loader_hooks.h"
#include "content/public/app/content_main.h"
+#include "content/public/common/content_switches.h"
// This is called by the VM when the shared library is first loaded.
// Most of the initialization is done in LibraryLoadedOnMainThread(), not here.
@@ -19,6 +21,11 @@ JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
if (!android_webview::RegisterJni(env))
return -1;
+ // Set the command line to enable synchronous API compatibility.
+ CommandLine::Init(0, NULL);
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kEnableWebViewSynchronousAPIs);
+
content::SetContentMainDelegate(new android_webview::AwMainDelegate());
return JNI_VERSION_1_4;

Powered by Google App Engine
This is Rietveld 408576698