Index: content/renderer/render_frame_impl.h |
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h |
index 1f866b1748bd28b3c1d11af2af74d2881a56f31c..cde9e367aa83bd687ff96d48e973538c95b531d0 100644 |
--- a/content/renderer/render_frame_impl.h |
+++ b/content/renderer/render_frame_impl.h |
@@ -28,6 +28,7 @@ |
#include "content/public/common/console_message_level.h" |
#include "content/public/common/javascript_message_type.h" |
#include "content/public/common/referrer.h" |
+#include "content/public/common/routed_interface.mojom.h" |
#include "content/public/common/stop_find_action.h" |
#include "content/public/renderer/render_frame.h" |
#include "content/renderer/frame_blame_context.h" |
@@ -167,7 +168,8 @@ class CONTENT_EXPORT RenderFrameImpl |
: public RenderFrame, |
NON_EXPORTED_BASE(mojom::Frame), |
NON_EXPORTED_BASE(public blink::WebFrameClient), |
- NON_EXPORTED_BASE(public blink::WebFrameSerializerClient) { |
+ NON_EXPORTED_BASE(public blink::WebFrameSerializerClient), |
+ NON_EXPORTED_BASE(public mojom::RoutedInterfaceProvider) { |
public: |
// Creates a new RenderFrame as the main frame of |render_view|. |
static RenderFrameImpl* CreateMainFrame( |
@@ -406,6 +408,13 @@ class CONTENT_EXPORT RenderFrameImpl |
bool IsHidden() override; |
shell::InterfaceRegistry* GetInterfaceRegistry() override; |
shell::InterfaceProvider* GetRemoteInterfaces() override; |
+ void AddRoutedInterface( |
+ const base::StringPiece& name, |
+ const GenericRoutedInterfaceFactory& factory) override; |
+ void RemoveRoutedInterface(const base::StringPiece& name) override; |
+ void GetRemoteRoutedInterface( |
+ const base::StringPiece& name, |
+ mojo::ScopedInterfaceEndpointHandle handle) override; |
#if defined(ENABLE_PLUGINS) |
void RegisterPeripheralPlugin( |
const url::Origin& content_origin, |
@@ -1014,6 +1023,8 @@ class CONTENT_EXPORT RenderFrameImpl |
void RegisterMojoInterfaces(); |
+ mojom::RoutedInterfaceProvider* GetRemoteRoutedInterfaces(); |
+ |
// Connect to an interface provided by the service registry. |
template <typename Interface> |
void GetInterface(mojo::InterfaceRequest<Interface> request); |
@@ -1036,6 +1047,11 @@ class CONTENT_EXPORT RenderFrameImpl |
void InitializeBlameContext(RenderFrameImpl* parent_frame); |
+ // mojom::RoutedInterfaceProvider: |
+ void GetRoutedInterface( |
+ const std::string& name, |
+ mojom::RoutedInterfaceAssociatedRequest request) override; |
+ |
// Stores the WebLocalFrame we are associated with. This is null from the |
// constructor until BindToWebFrame is called, and it is null after |
// frameDetached is called until destruction (which is asynchronous in the |
@@ -1275,6 +1291,9 @@ class CONTENT_EXPORT RenderFrameImpl |
// Indicates whether |didAccessInitialDocument| was called. |
bool has_accessed_initial_document_; |
+ std::map<std::string, GenericRoutedInterfaceFactory> routed_interfaces_; |
+ mojom::RoutedInterfaceProviderAssociatedPtr remote_routed_interfaces_; |
+ |
base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |