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..bb5836d5d5f7cf1d46a492285c48333b1881a244 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,17 @@ void RenderProcessHostImpl::NotifyTimezoneChange() { |
Send(new ViewMsg_TimezoneChange()); |
} |
+ServiceRegistry* RenderProcessHostImpl::GetServiceRegistry() { |
+ if (!mojo_application_host_) |
+ return NULL; |
+ return mojo_application_host_->service_registry(); |
+} |
+ |
+void RenderProcessHostImpl::ActivateMojo() { |
+ mojo_activation_required_ = true; |
+ MaybeActivateMojo(); |
+} |
+ |
void RenderProcessHostImpl::AddRoute( |
int32 routing_id, |
IPC::Listener* listener) { |
@@ -1924,7 +1933,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,19 +2190,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, |