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