Chromium Code Reviews| Index: content/child/child_thread.cc |
| diff --git a/content/child/child_thread.cc b/content/child/child_thread.cc |
| index 72be9fba30678ed1e49a9cec6b18d4e0166d84e0..4bced8c0817645f138a7ca674f99d9e1b142f069 100644 |
| --- a/content/child/child_thread.cc |
| +++ b/content/child/child_thread.cc |
| @@ -29,6 +29,7 @@ |
| #include "content/child/child_resource_message_filter.h" |
| #include "content/child/child_shared_bitmap_manager.h" |
| #include "content/child/fileapi/file_system_dispatcher.h" |
| +#include "content/child/mojo/mojo_application.h" |
| #include "content/child/power_monitor_broadcast_source.h" |
| #include "content/child/quota_dispatcher.h" |
| #include "content/child/quota_message_filter.h" |
| @@ -236,6 +237,8 @@ void ChildThread::Init() { |
| IPC::Logging::GetInstance()->SetIPCSender(this); |
| #endif |
| + mojo_application_.reset(new MojoApplication(this)); |
| + |
| sync_message_filter_ = |
| new IPC::SyncMessageFilter(ChildProcess::current()->GetShutDownEvent()); |
| thread_safe_sender_ = new ThreadSafeSender( |
| @@ -349,6 +352,13 @@ void ChildThread::OnChannelError() { |
| base::MessageLoop::current()->Quit(); |
| } |
| +void ChildThread::AcceptConnection( |
| + const mojo::String& service_name, |
| + mojo::ScopedMessagePipeHandle message_pipe) { |
| + // By default, we don't expect incoming connections. |
| + NOTREACHED(); |
| +} |
| + |
| bool ChildThread::Send(IPC::Message* msg) { |
| DCHECK(base::MessageLoop::current() == message_loop()); |
| if (!channel_) { |
| @@ -409,6 +419,9 @@ base::SharedMemory* ChildThread::AllocateSharedMemory( |
| } |
| bool ChildThread::OnMessageReceived(const IPC::Message& msg) { |
| + if (mojo_application_->OnMessageReceived(msg)) |
|
Tom Sepez
2014/04/22 21:26:18
nit: maybe this goes last since it is so rarely ca
|
| + return true; |
| + |
| // Resource responses are sent to the resource dispatcher. |
| if (resource_dispatcher_->OnMessageReceived(msg)) |
| return true; |