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

Unified Diff: content/browser/renderer_host/render_process_host_impl.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: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index bc5c4bfcf36ca7f93dcc5b4a143014a9482d1bb8..49ef084a5464212a0cbf9b642fde667c6cb3808f 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -111,6 +111,7 @@
#include "ipc/ipc_logging.h"
#include "ipc/ipc_platform_file.h"
#include "ipc/ipc_switches.h"
+#include "ipc/ipc_sync_channel.h"
#include "media/base/media_switches.h"
#include "net/url_request/url_request_context_getter.h"
#include "ui/base/ui_base_switches.h"
@@ -343,6 +344,9 @@ RenderProcessHostImpl::RenderProcessHostImpl(
storage_partition_impl_(storage_partition_impl),
sudden_termination_allowed_(true),
ignore_input_events_(false),
+#if defined(OS_ANDROID)
+ dummy_shutdown_event_(false, false),
+#endif
is_guest_(is_guest) {
widget_helper_ = new RenderWidgetHelper();
@@ -450,9 +454,19 @@ bool RenderProcessHostImpl::Init() {
// Setup the IPC channel.
const std::string channel_id =
IPC::Channel::GenerateVerifiedChannelID(std::string());
- channel_.reset(new IPC::ChannelProxy(
- channel_id, IPC::Channel::MODE_SERVER, this,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
+ channel_.reset(
+#if defined(OS_ANDROID)
+ // Android WebView needs to be able to wait from the UI thread to support
+ // the synchronous legacy APIs.
+ browser_command_line.HasSwitch(switches::kEnableWebViewSynchronousAPIs) ?
+ new IPC::SyncChannel(
+ channel_id, IPC::Channel::MODE_SERVER, this,
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
+ true, &dummy_shutdown_event_) :
+#endif
+ new IPC::ChannelProxy(
+ channel_id, IPC::Channel::MODE_SERVER, this,
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
// Call the embedder first so that their IPC filters have priority.
GetContentClient()->browser()->RenderProcessHostCreated(this);
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/browser/renderer_host/render_view_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698