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

Unified Diff: third_party/WebKit/public/platform/Platform.h

Issue 2651883008: Make content::FeaturePolicy implement WebFeaturePolicy, and use it in blink code (Closed)
Patch Set: Duplicate FP object rather than modifying in-place 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/public/platform/Platform.h
diff --git a/third_party/WebKit/public/platform/Platform.h b/third_party/WebKit/public/platform/Platform.h
index 2cd733425ef79bd2439da87fd20289c818d43e03..9b20ac06bada87bb651c29bc058b0d7df0cc5518 100644
--- a/third_party/WebKit/public/platform/Platform.h
+++ b/third_party/WebKit/public/platform/Platform.h
@@ -41,6 +41,7 @@
#include "WebCommon.h"
#include "WebData.h"
#include "WebDeviceLightListener.h"
+#include "WebFeaturePolicy.h"
#include "WebGamepadListener.h"
#include "WebGamepads.h"
#include "WebGestureDevice.h"
@@ -682,6 +683,28 @@ class BLINK_PLATFORM_EXPORT Platform {
// depending on memory pressure.
virtual void requestPurgeMemory() {}
+ // Feature Policy -----------------------------------------------------
+
+ // Create a new feature policy object for a document, given its parent
+ // document's policy (may be nullptr), its container policy (may be empty),
+ // the header policy with which it was delivered (may be empty), and the
+ // document's origin.
+ virtual WebFeaturePolicy* createFeaturePolicy(
+ const WebFeaturePolicy* parentPolicy,
+ const WebParsedFeaturePolicyHeader& containerPolicy,
+ const WebParsedFeaturePolicyHeader& policyHeader,
+ const WebSecurityOrigin&) {
+ return nullptr;
+ }
+
+ // Create a new feature policy for a document whose origin has changed, given
+ // the previous policy object and the new origin.
+ virtual WebFeaturePolicy* duplicateFeaturePolicyWithOrigin(
+ const WebFeaturePolicy&,
+ const WebSecurityOrigin&) {
+ return nullptr;
+ }
+
protected:
Platform();
virtual ~Platform() {}

Powered by Google App Engine
This is Rietveld 408576698