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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 553283002: IPC::ChannelMojo: Introduce IPC::MojoBootstrap for Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added ChannelMojoHost Created 6 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 0103ce7ebffa6b0f5281ed07a0c7c184b3a394ea..63869909be505ce972a59c6890df0d8822bfd61b 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -136,6 +136,7 @@
#include "ipc/ipc_logging.h"
#include "ipc/ipc_switches.h"
#include "ipc/mojo/ipc_channel_mojo.h"
+#include "ipc/mojo/ipc_channel_mojo_host.h"
#include "media/base/media_switches.h"
#include "net/url_request/url_request_context_getter.h"
#include "ppapi/shared_impl/ppapi_switches.h"
@@ -426,7 +427,9 @@ RenderProcessHostImpl::RenderProcessHostImpl(
BrowserContext* browser_context,
StoragePartitionImpl* storage_partition_impl,
bool is_isolated_guest)
- : fast_shutdown_started_(false),
+ : channel_host_(new IPC::ChannelMojoHost(
viettrungluu 2014/09/17 17:33:15 Do you want to create this even if ShouldUseMojoCh
Hajime Morrita 2014/09/17 19:33:48 Good point. make it lazy.
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))),
+ fast_shutdown_started_(false),
deleting_soon_(false),
#ifndef NDEBUG
is_self_deleted_(false),
@@ -650,9 +653,9 @@ scoped_ptr<IPC::ChannelProxy> RenderProcessHostImpl::CreateChannelProxy(
if (ShouldUseMojoChannel()) {
VLOG(1) << "Mojo Channel is enabled on host";
return IPC::ChannelProxy::Create(
- IPC::ChannelMojo::CreateFactory(
- channel_id, IPC::Channel::MODE_SERVER, runner),
- this, runner.get());
+ IPC::ChannelMojo::CreateServerFactory(channel_host_.get(), channel_id),
+ this,
+ runner.get());
}
return IPC::ChannelProxy::Create(
@@ -2070,6 +2073,8 @@ void RenderProcessHostImpl::OnProcessLaunched() {
// Chrome IPC message.
mojo_application_host_->Activate(this, GetHandle());
+ channel_host_->OnClientLaunched(child_process_launcher_->GetHandle());
+
while (!queued_messages_.empty()) {
Send(queued_messages_.front());
queued_messages_.pop();

Powered by Google App Engine
This is Rietveld 408576698