Index: content/browser/frame_host/render_frame_host_impl.cc |
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc |
index 707e69a636f7ea0b1d79939c6513311c9bc0812c..8f2efe4d97284a6964ee0847f26beee26cfebda3 100644 |
--- a/content/browser/frame_host/render_frame_host_impl.cc |
+++ b/content/browser/frame_host/render_frame_host_impl.cc |
@@ -18,12 +18,14 @@ |
#include "content/browser/frame_host/render_frame_proxy_host.h" |
#include "content/browser/renderer_host/input/input_router.h" |
#include "content/browser/renderer_host/input/timeout_monitor.h" |
+#include "content/browser/renderer_host/render_process_host_impl.h" |
#include "content/browser/renderer_host/render_view_host_impl.h" |
#include "content/browser/renderer_host/render_widget_host_impl.h" |
#include "content/common/desktop_notification_messages.h" |
#include "content/common/frame_messages.h" |
#include "content/common/input_messages.h" |
#include "content/common/inter_process_time_ticks_converter.h" |
+#include "content/common/render_frame_setup.mojom.h" |
#include "content/common/swapped_out_messages.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/content_browser_client.h" |
@@ -161,6 +163,15 @@ RenderFrameHostImpl::RenderFrameHostImpl( |
g_routing_id_frame_map.Get().insert(std::make_pair( |
RenderFrameHostID(GetProcess()->GetID(), routing_id_), |
this)); |
+ |
+ if (GetProcess()->GetServiceRegistry()) { |
+ RenderFrameSetupPtr setup; |
+ GetProcess()->GetServiceRegistry()->GetRemoteInterface(&setup); |
+ mojo::IInterfaceProviderPtr service_provider; |
+ setup->GetServiceProvider(routing_id_, mojo::Get(&service_provider)); |
darin (slow to review)
2014/06/21 04:33:35
nit: It might read better if this were GetServiceP
Sam McNally
2014/06/24 04:00:29
Done.
|
+ service_registry_.BindRemoteServiceProvider( |
+ service_provider.PassMessagePipe()); |
+ } |
} |
RenderFrameHostImpl::~RenderFrameHostImpl() { |
@@ -241,6 +252,11 @@ RenderViewHost* RenderFrameHostImpl::GetRenderViewHost() { |
return render_view_host_; |
} |
+ServiceRegistry* RenderFrameHostImpl::GetServiceRegistry() { |
+ static_cast<RenderProcessHostImpl*>(GetProcess())->ActivateMojo(); |
darin (slow to review)
2014/06/21 04:33:35
nit: perhaps we should rename ActivateMojo to Ensu
Sam McNally
2014/06/24 04:00:29
Done.
|
+ return &service_registry_; |
+} |
+ |
bool RenderFrameHostImpl::Send(IPC::Message* message) { |
if (IPC_MESSAGE_ID_CLASS(message->type()) == InputMsgStart) { |
return render_view_host_->input_router()->SendInput( |