| 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 de8f5b46a6893d6940a4d2266fadb51d527c19c4..f3077a484bfa2108a007b4916c912e19e8188fe3 100644
|
| --- a/content/browser/renderer_host/render_process_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_process_host_impl.cc
|
| @@ -67,7 +67,6 @@
|
| #include "content/browser/media/midi_host.h"
|
| #include "content/browser/message_port_message_filter.h"
|
| #include "content/browser/mime_registry_message_filter.h"
|
| -#include "content/browser/mojo/mojo_application_host.h"
|
| #include "content/browser/plugin_service_impl.h"
|
| #include "content/browser/profiler_message_filter.h"
|
| #include "content/browser/push_messaging_message_filter.h"
|
| @@ -139,7 +138,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"
|
| @@ -445,6 +443,7 @@ RenderProcessHostImpl::RenderProcessHostImpl(
|
| is_self_deleted_(false),
|
| #endif
|
| pending_views_(0),
|
| + mojo_application_host_(new MojoApplicationHost),
|
| mojo_activation_required_(false),
|
| visible_widgets_(0),
|
| backgrounded_(true),
|
| @@ -594,7 +593,6 @@ bool RenderProcessHostImpl::Init() {
|
| BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get());
|
|
|
| // Setup the Mojo channel.
|
| - mojo_application_host_.reset(new MojoApplicationHost());
|
| mojo_application_host_->Init();
|
|
|
| // Call the embedder first so that their IPC filters have priority.
|
| @@ -900,6 +898,12 @@ void RenderProcessHostImpl::NotifyTimezoneChange() {
|
| Send(new ViewMsg_TimezoneChange());
|
| }
|
|
|
| +ServiceRegistry* RenderProcessHostImpl::GetServiceRegistry() {
|
| + if (!mojo_application_host_)
|
| + return NULL;
|
| + return mojo_application_host_->service_registry();
|
| +}
|
| +
|
| void RenderProcessHostImpl::AddRoute(
|
| int32 routing_id,
|
| IPC::Listener* listener) {
|
| @@ -1924,7 +1928,7 @@ void RenderProcessHostImpl::ProcessDied(bool already_dead) {
|
| iter.Advance();
|
| }
|
|
|
| - mojo_application_host_.reset();
|
| + mojo_application_host_.reset(new MojoApplicationHost);
|
|
|
| // It's possible that one of the calls out to the observers might have caused
|
| // this object to be no longer needed.
|
| @@ -2181,17 +2185,9 @@ void RenderProcessHostImpl::DecrementWorkerRefCount() {
|
| Cleanup();
|
| }
|
|
|
| -void RenderProcessHostImpl::ConnectTo(
|
| - const base::StringPiece& service_name,
|
| - mojo::ScopedMessagePipeHandle handle) {
|
| +void RenderProcessHostImpl::ActivateMojo() {
|
| 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,
|
|
|