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 0935110406af3f46be3823d3acfdccf37ac1af2a..5e0158eafd5fb068ccd0105ca0f6b5b6043d582c 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.cc |
+++ b/content/browser/renderer_host/render_process_host_impl.cc |
@@ -68,7 +68,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" |
@@ -140,7 +139,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" |
@@ -447,6 +445,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), |
@@ -596,7 +595,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. |
@@ -907,6 +905,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) { |
@@ -1935,7 +1939,8 @@ void RenderProcessHostImpl::ProcessDied(bool already_dead) { |
iter.Advance(); |
} |
- mojo_application_host_.reset(); |
+ mojo_application_host_.reset(new MojoApplicationHost); |
+ mojo_activation_required_ = false; |
// It's possible that one of the calls out to the observers might have caused |
// this object to be no longer needed. |
@@ -2255,17 +2260,9 @@ void RenderProcessHostImpl::DecrementWorkerRefCount() { |
Cleanup(); |
} |
-void RenderProcessHostImpl::ConnectTo( |
- const base::StringPiece& service_name, |
- mojo::ScopedMessagePipeHandle handle) { |
+void RenderProcessHostImpl::EnsureMojoActivated() { |
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, |