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

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: Fixed build error 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
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/child/child_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c87bf1f94e13ab068c6f750feb01632b152dcde7..3aad67234b7f762720118735e80f29b5bb6f3a03 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -137,6 +137,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"
@@ -669,10 +670,15 @@ scoped_ptr<IPC::ChannelProxy> RenderProcessHostImpl::CreateChannelProxy(
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
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());
+ if (!channel_mojo_host_) {
+ channel_mojo_host_.reset(new IPC::ChannelMojoHost(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
+ }
+
+ return IPC::ChannelProxy::Create(IPC::ChannelMojo::CreateServerFactory(
+ channel_mojo_host_.get(), channel_id),
+ this,
+ runner.get());
}
return IPC::ChannelProxy::Create(
@@ -2097,6 +2103,9 @@ void RenderProcessHostImpl::OnProcessLaunched() {
// Chrome IPC message.
MaybeActivateMojo();
+ if (channel_mojo_host_)
+ channel_mojo_host_->OnClientLaunched(child_process_launcher_->GetHandle());
+
while (!queued_messages_.empty()) {
Send(queued_messages_.front());
queued_messages_.pop();
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/child/child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698