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

Unified Diff: content/renderer/render_frame_impl.h

Issue 2566583002: Change allowed bindings to be per RenderFrame instead of per RenderView. (Closed)
Patch Set: Created 3 years, 11 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.h
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 53041fd826710fc60da926c5cf92860491bb979f..0f8ce758caa31e957a71bfd41db7b988375dba37 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -174,6 +174,7 @@ class CONTENT_EXPORT RenderFrameImpl
NON_EXPORTED_BASE(blink::mojom::EngagementClient),
NON_EXPORTED_BASE(mojom::Frame),
NON_EXPORTED_BASE(mojom::HostZoom),
+ NON_EXPORTED_BASE(mojom::FrameBindingsControl),
NON_EXPORTED_BASE(public blink::WebFrameClient),
NON_EXPORTED_BASE(public blink::WebFrameSerializerClient) {
public:
@@ -454,6 +455,7 @@ class CONTENT_EXPORT RenderFrameImpl
bool IsPasting() const override;
blink::WebPageVisibilityState GetVisibilityState() const override;
bool IsBrowserSideNavigationPending() override;
+ int GetEnabledBindings() const override;
// blink::mojom::EngagementClient implementation:
void SetEngagementLevel(const url::Origin& origin,
@@ -463,6 +465,9 @@ class CONTENT_EXPORT RenderFrameImpl
void GetInterfaceProvider(
service_manager::mojom::InterfaceProviderRequest request) override;
+ // mojom::FrameBindingsControl implementation:
+ void AllowBindings(int32_t enabled_bindings_flags) override;
+
// mojom::HostZoom implementation:
void SetHostZoomLevel(const GURL& url, double zoom_level) override;
@@ -671,6 +676,9 @@ class CONTENT_EXPORT RenderFrameImpl
// Binds to the FrameHost in the browser.
void BindFrame(mojom::FrameRequest request, mojom::FrameHostPtr frame_host);
+ void BindFrameBindingsControl(
+ mojom::FrameBindingsControlAssociatedRequest request);
+
ManifestManager* manifest_manager();
// TODO(creis): Remove when the only caller, the HistoryController, is no
@@ -1362,6 +1370,8 @@ class CONTENT_EXPORT RenderFrameImpl
mojo::AssociatedBinding<blink::mojom::EngagementClient> engagement_binding_;
mojo::Binding<mojom::Frame> frame_binding_;
mojo::AssociatedBinding<mojom::HostZoom> host_zoom_binding_;
+ mojo::AssociatedBinding<mojom::FrameBindingsControl>
+ frame_bindings_control_binding_;
mojom::FrameHostPtr frame_host_;
// Indicates whether |didAccessInitialDocument| was called.
@@ -1377,6 +1387,10 @@ class CONTENT_EXPORT RenderFrameImpl
bool browser_side_navigation_pending_ = false;
+ // A bitwise OR of bindings types that have been enabled for this RenderFrame.
+ // See BindingsPolicy for details.
+ int enabled_bindings_ = 0;
+
base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);

Powered by Google App Engine
This is Rietveld 408576698