Index: third_party/WebKit/public/platform/WebFeaturePolicy.h |
diff --git a/third_party/WebKit/public/platform/WebFeaturePolicy.h b/third_party/WebKit/public/platform/WebFeaturePolicy.h |
index 5b8bdfb1f800fa29abd3846567dcaa32383d6111..93865643a42f9114710189f88492db74ebcb13c6 100644 |
--- a/third_party/WebKit/public/platform/WebFeaturePolicy.h |
+++ b/third_party/WebKit/public/platform/WebFeaturePolicy.h |
@@ -5,6 +5,7 @@ |
#ifndef WebFeaturePolicy_h |
#define WebFeaturePolicy_h |
+#include "WebCommon.h" |
#include "WebSecurityOrigin.h" |
#include "WebString.h" |
#include "WebVector.h" |
@@ -47,7 +48,7 @@ enum class WebFeaturePolicyFeature { |
LAST_FEATURE = WebRTC |
}; |
-struct WebParsedFeaturePolicyDeclaration { |
+struct BLINK_PLATFORM_EXPORT WebParsedFeaturePolicyDeclaration { |
WebParsedFeaturePolicyDeclaration() : matchesAllOrigins(false) {} |
WebString featureName; |
bool matchesAllOrigins; |
@@ -59,6 +60,17 @@ struct WebParsedFeaturePolicyDeclaration { |
using WebParsedFeaturePolicyHeader = |
WebVector<WebParsedFeaturePolicyDeclaration>; |
+// Composed full policy for a document. Stored in SecurityContext for each |
+// document. This is essentially an opaque handle to an object in the embedder. |
+class BLINK_PLATFORM_EXPORT WebFeaturePolicy { |
+ public: |
+ virtual ~WebFeaturePolicy() {} |
+ |
+ // Returns whether or not the given feature is enabled for the origin of the |
+ // document that owns the policy. |
+ virtual bool IsFeatureEnabled(blink::WebFeaturePolicyFeature) const = 0; |
+}; |
+ |
} // namespace blink |
#endif // WebFeaturePolicy_h |