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

Unified Diff: content/child/child_thread_impl.cc

Issue 1184523003: attachment broker wip (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor comments. Created 5 years, 6 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/child/child_thread_impl.h ('k') | content/child/npapi/np_channel_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread_impl.cc
diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
index 9f5b3154a3dca7c5bb6b6283308b02bf967341c8..5192c3aff2c64bfbcda72f6cce6046a1b950e05c 100644
--- a/content/child/child_thread_impl.cc
+++ b/content/child/child_thread_impl.cc
@@ -55,6 +55,7 @@
#include "content/common/child_process_messages.h"
#include "content/common/in_process_child_thread_params.h"
#include "content/public/common/content_switches.h"
+#include "ipc/attachment_broker.h"
#include "ipc/ipc_logging.h"
#include "ipc/ipc_switches.h"
#include "ipc/ipc_sync_channel.h"
@@ -73,6 +74,10 @@
#include "content/child/child_io_surface_manager_mac.h"
#endif
+#if defined(OS_WIN)
+#include "ipc/attachment_broker_win.h"
+#endif
+
using tracked_objects::ThreadData;
namespace content {
@@ -307,14 +312,16 @@ void ChildThreadImpl::ConnectChannel(bool use_mojo_channel) {
VLOG(1) << "Mojo is enabled on child";
scoped_refptr<base::SequencedTaskRunner> io_task_runner = GetIOTaskRunner();
DCHECK(io_task_runner);
- channel_->Init(IPC::ChannelMojo::CreateClientFactory(
- nullptr, io_task_runner, channel_name_),
- create_pipe_now);
+ channel_->Init(
+ IPC::ChannelMojo::CreateClientFactory(
+ nullptr, io_task_runner, channel_name_, attachment_broker_.get()),
+ create_pipe_now);
return;
}
VLOG(1) << "Mojo is disabled on child";
- channel_->Init(channel_name_, IPC::Channel::MODE_CLIENT, create_pipe_now);
+ channel_->Init(channel_name_, IPC::Channel::MODE_CLIENT, create_pipe_now,
+ attachment_broker_.get());
}
void ChildThreadImpl::Init(const Options& options) {
@@ -337,6 +344,10 @@ void ChildThreadImpl::Init(const Options& options) {
IPC::Logging::GetInstance()->SetIPCSender(this);
#endif
+#if defined(OS_WIN)
+ attachment_broker_.reset(new IPC::AttachmentBrokerWin());
+#endif
+
mojo_application_.reset(new MojoApplication(GetIOTaskRunner()));
sync_message_filter_ =
@@ -510,6 +521,10 @@ void ChildThreadImpl::ReleaseCachedFonts() {
}
#endif
+IPC::AttachmentBroker* ChildThreadImpl::GetAttachmentBroker() {
+ return attachment_broker_.get();
+}
+
MessageRouter* ChildThreadImpl::GetRouter() {
DCHECK(base::MessageLoop::current() == message_loop());
return &router_;
« no previous file with comments | « content/child/child_thread_impl.h ('k') | content/child/npapi/np_channel_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698