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

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 2132cb23060fef2c33c36566932275c1b7763222..3dec8683df592cccc10e74278ac7b24288fb130e 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -173,6 +173,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:
@@ -451,6 +452,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,
@@ -460,6 +462,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;
@@ -669,6 +674,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
@@ -1348,6 +1356,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.
@@ -1363,6 +1373,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