| Index: third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.h
|
| diff --git a/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.h b/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.h
|
| index f45ccd19961f77e3ec3c1ffe87149911e8663039..4ca4a9a7a7c1df5fc46c77bf636cbeea84b1329b 100644
|
| --- a/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.h
|
| +++ b/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.h
|
| @@ -47,6 +47,25 @@ namespace blink {
|
| // "*" refers to all origins; any origin will match a whitelist which contains
|
| // it.
|
| //
|
| +// Declarations
|
| +// ------------
|
| +// A feature policy declaration is a mapping of a feature name to a whitelist.
|
| +// A set of declarations is a declared policy.
|
| +//
|
| +// Inherited Policy
|
| +// ----------------
|
| +// In addition to the declared policy (which may be empty), every frame has
|
| +// an inherited policy, which is determined by the context in which it is
|
| +// embedded, or by the defaults for each feature in the case of the top-level
|
| +// document.
|
| +//
|
| +// Container Policy
|
| +// ----------------
|
| +// A declared policy can be set on a specific frame by the embedding page using
|
| +// the iframe "allow" attribute, or through attributes such as "allowfullscreen"
|
| +// or "allowpaymentrequest". This is the container policy for the embedded
|
| +// frame.
|
| +//
|
| // Defaults
|
| // --------
|
| // Each defined feature has a default policy, which determines whether the
|
| @@ -139,6 +158,7 @@ class PLATFORM_EXPORT FeaturePolicy final {
|
|
|
| static std::unique_ptr<FeaturePolicy> createFromParentPolicy(
|
| const FeaturePolicy* parent,
|
| + const WebParsedFeaturePolicyHeader* containerPolicy,
|
| RefPtr<SecurityOrigin>);
|
|
|
| // Sets the declared policy from the parsed Feature-Policy HTTP header.
|
| @@ -170,9 +190,15 @@ class PLATFORM_EXPORT FeaturePolicy final {
|
|
|
| static std::unique_ptr<FeaturePolicy> createFromParentPolicy(
|
| const FeaturePolicy* parent,
|
| + const WebParsedFeaturePolicyHeader* containerPolicy,
|
| RefPtr<SecurityOrigin>,
|
| FeatureList& features);
|
|
|
| + // Updates the inherited policy with the declarations from the iframe allow*
|
| + // attributes.
|
| + void addContainerPolicy(const WebParsedFeaturePolicyHeader* containerPolicy,
|
| + const FeaturePolicy* parent);
|
| +
|
| RefPtr<SecurityOrigin> m_origin;
|
|
|
| // Records whether or not each feature was enabled for this frame by its
|
|
|