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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2310563002: Adds routed interface support between RenderFrameHost and RenderFrame (Closed)
Patch Set: nit 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
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | ipc/ipc_channel_mojo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index f580526323d13b673d5d1ee4a7133846afc88609..e74b334c49cdf2f4fc7241869a873f228b9991d3 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -46,6 +46,8 @@
#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/associated_interfaces.mojom.h"
#include "content/common/clipboard_messages.h"
#include "content/common/content_constants_internal.h"
#include "content/common/content_security_policy_header.h"
@@ -2430,6 +2432,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(
+ routing_id_,
+ 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,
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | ipc/ipc_channel_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698