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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 2655663004: Introduce content-side Feature Policy object and maintain in parallel with renderer policy. (Closed)
Patch Set: Simplify FP mirroring logic; move most of it to RFHI Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 73 }
74 74
75 namespace gfx { 75 namespace gfx {
76 class Range; 76 class Range;
77 } 77 }
78 78
79 namespace content { 79 namespace content {
80 class AppWebMessagePortMessageFilter; 80 class AppWebMessagePortMessageFilter;
81 class AssociatedInterfaceProviderImpl; 81 class AssociatedInterfaceProviderImpl;
82 class CrossProcessFrameConnector; 82 class CrossProcessFrameConnector;
83 class FeaturePolicy;
83 class FrameTree; 84 class FrameTree;
84 class FrameTreeNode; 85 class FrameTreeNode;
85 class MediaInterfaceProxy; 86 class MediaInterfaceProxy;
86 class NavigationHandleImpl; 87 class NavigationHandleImpl;
87 class PermissionServiceContext; 88 class PermissionServiceContext;
88 class RenderFrameHostDelegate; 89 class RenderFrameHostDelegate;
89 class RenderFrameProxyHost; 90 class RenderFrameProxyHost;
90 class RenderProcessHost; 91 class RenderProcessHost;
91 class RenderViewHostImpl; 92 class RenderViewHostImpl;
92 class RenderWidgetHostDelegate; 93 class RenderWidgetHostDelegate;
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 // Destroys all WebUI instances and resets related data. 583 // Destroys all WebUI instances and resets related data.
583 void ClearAllWebUI(); 584 void ClearAllWebUI();
584 585
585 // Returns the Mojo ImageDownloader service. 586 // Returns the Mojo ImageDownloader service.
586 const content::mojom::ImageDownloaderPtr& GetMojoImageDownloader(); 587 const content::mojom::ImageDownloaderPtr& GetMojoImageDownloader();
587 588
588 // Resets the loading state. Following this call, the RenderFrameHost will be 589 // Resets the loading state. Following this call, the RenderFrameHost will be
589 // in a non-loading state. 590 // in a non-loading state.
590 void ResetLoadingState(); 591 void ResetLoadingState();
591 592
593 // Returns the feature policy which should be enforced on this RenderFrame.
594 const FeaturePolicy* GetFeaturePolicy();
alexmos 2017/02/09 05:59:50 nit: no const (see a note in https://www.chromium.
iclelland 2017/02/09 17:16:18 Done. (I thought this only applied to headers in c
595
596 // Clears any existing policy and constructs a new policy for this frame,
597 // based on its parent frame.
598 void ResetFeaturePolicy();
599
592 // Tells the renderer that this RenderFrame will soon be swapped out, and thus 600 // Tells the renderer that this RenderFrame will soon be swapped out, and thus
593 // not to create any new modal dialogs until it happens. This must be done 601 // not to create any new modal dialogs until it happens. This must be done
594 // separately so that the ScopedPageLoadDeferrers of any current dialogs are 602 // separately so that the ScopedPageLoadDeferrers of any current dialogs are
595 // no longer on the stack when we attempt to swap it out. 603 // no longer on the stack when we attempt to swap it out.
596 void SuppressFurtherDialogs(); 604 void SuppressFurtherDialogs();
597 605
598 void SetHasReceivedUserGesture(); 606 void SetHasReceivedUserGesture();
599 607
600 void ClearFocusedElement(); 608 void ClearFocusedElement();
601 609
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 std::vector<std::unique_ptr<service_manager::InterfaceRegistry>> 1144 std::vector<std::unique_ptr<service_manager::InterfaceRegistry>>
1137 media_registries_; 1145 media_registries_;
1138 1146
1139 std::unique_ptr<AssociatedInterfaceProviderImpl> 1147 std::unique_ptr<AssociatedInterfaceProviderImpl>
1140 remote_associated_interfaces_; 1148 remote_associated_interfaces_;
1141 1149
1142 // A bitwise OR of bindings types that have been enabled for this RenderFrame. 1150 // A bitwise OR of bindings types that have been enabled for this RenderFrame.
1143 // See BindingsPolicy for details. 1151 // See BindingsPolicy for details.
1144 int enabled_bindings_ = 0; 1152 int enabled_bindings_ = 0;
1145 1153
1154 // Tracks the feature policy which has been set on this frame.
1155 std::unique_ptr<FeaturePolicy> feature_policy_;
alexmos 2017/02/09 05:59:50 Currently, seems like this will be null from the t
iclelland 2017/02/09 17:16:17 Acknowledged. I'll see about doing an explicit pre
1156
1146 // NOTE: This must be the last member. 1157 // NOTE: This must be the last member.
1147 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 1158 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
1148 1159
1149 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 1160 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
1150 }; 1161 };
1151 1162
1152 } // namespace content 1163 } // namespace content
1153 1164
1154 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 1165 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698