| 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;
|
|
|