Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1736)

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2310563002: Adds routed interface support between RenderFrameHost and RenderFrame (Closed)
Patch Set: rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 32e04de5c8bab6bf8ad95ef6af54496d3bbe3a0e..b726cbde436671a377199e0f8f81dd1a31212915 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -46,6 +46,7 @@
#include "content/child/webmessageportchannel_impl.h"
#include "content/child/weburlresponse_extradata_impl.h"
#include "content/common/accessibility_messages.h"
+#include "content/common/associated_interface_provider_impl.h"
#include "content/common/clipboard_messages.h"
#include "content/common/content_constants_internal.h"
#include "content/common/content_security_policy_header.h"
@@ -2402,6 +2403,26 @@ shell::InterfaceProvider* RenderFrameImpl::GetRemoteInterfaces() {
return remote_interfaces_.get();
}
+AssociatedInterfaceRegistry*
+RenderFrameImpl::GetAssociatedInterfaceRegistry() {
+ return &associated_interfaces_;
+}
+
+AssociatedInterfaceProvider*
+RenderFrameImpl::GetRemoteAssociatedInterfaces() {
+ if (!remote_associated_interfaces_) {
+ ChildThreadImpl* thread = ChildThreadImpl::current();
+ mojom::AssociatedInterfaceProviderAssociatedPtr remote_interfaces;
+ thread->GetRemoteRouteProvider()->GetRoute(
+ GetRoutingID(),
jam 2016/09/14 17:05:06 nit: usually RF just uses routing_id_ instead of t
+ mojo::GetProxy(&remote_interfaces,
+ thread->channel()->GetAssociatedGroup()));
+ remote_associated_interfaces_.reset(new AssociatedInterfaceProviderImpl(
+ std::move(remote_interfaces)));
+ }
+ return remote_associated_interfaces_.get();
+}
+
#if defined(ENABLE_PLUGINS)
void RenderFrameImpl::RegisterPeripheralPlugin(
const url::Origin& content_origin,

Powered by Google App Engine
This is Rietveld 408576698