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 81d8cc900702b8e90cf8b627ff708a5562fac82c..107f8485b5b5b9ec7b5d16a6812fe1ec5b2ac19d 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.cc |
+++ b/content/browser/renderer_host/render_process_host_impl.cc |
@@ -141,7 +141,6 @@ |
#include "ipc/ipc_logging.h" |
#include "ipc/ipc_switches.h" |
#include "media/base/media_switches.h" |
-#include "mojo/common/common_type_converters.h" |
#include "net/url_request/url_request_context_getter.h" |
#include "ppapi/shared_impl/ppapi_switches.h" |
#include "third_party/skia/include/core/SkBitmap.h" |
@@ -597,8 +596,10 @@ bool RenderProcessHostImpl::Init() { |
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get()); |
// Setup the Mojo channel. |
+ mojo::ScopedMessagePipeHandle shell_handle; |
mojo_application_host_.reset(new MojoApplicationHost()); |
- mojo_application_host_->Init(); |
+ mojo_application_host_->Init(&shell_handle); |
+ service_registry_.Bind(shell_handle.Pass()); |
// Call the embedder first so that their IPC filters have priority. |
GetContentClient()->browser()->RenderProcessWillLaunch(this); |
@@ -904,6 +905,15 @@ void RenderProcessHostImpl::NotifyTimezoneChange() { |
Send(new ViewMsg_TimezoneChange()); |
} |
+ServiceRegistry* RenderProcessHostImpl::GetServiceRegistry() { |
+ return &service_registry_; |
+} |
+ |
+void RenderProcessHostImpl::ActivateMojo() { |
+ mojo_activation_required_ = true; |
+ MaybeActivateMojo(); |
+} |
+ |
void RenderProcessHostImpl::AddRoute( |
int32 routing_id, |
IPC::Listener* listener) { |
@@ -2193,19 +2203,6 @@ void RenderProcessHostImpl::DecrementWorkerRefCount() { |
Cleanup(); |
} |
-void RenderProcessHostImpl::ConnectTo( |
- const base::StringPiece& service_name, |
- mojo::ScopedMessagePipeHandle handle) { |
- mojo_activation_required_ = true; |
- MaybeActivateMojo(); |
- |
- mojo_application_host_->service_provider()->ConnectToService( |
- mojo::String::From(service_name), |
- std::string(), |
- handle.Pass(), |
- mojo::String()); |
-} |
- |
void RenderProcessHostImpl::OnAllocateGpuMemoryBuffer(uint32 width, |
uint32 height, |
uint32 internalformat, |