| Index: third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h
|
| index 8a569c0853566505360638ed0e20ce5c0f065a61..3f92dbd800d6e62ffcf78fe7b1aa75641607999b 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h
|
| +++ b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h
|
| @@ -25,6 +25,7 @@
|
| #include "core/dom/Document.h"
|
| #include "core/frame/FrameOwner.h"
|
| #include "core/html/HTMLElement.h"
|
| +#include "platform/feature_policy/FeaturePolicy.h"
|
| #include "platform/heap/Handle.h"
|
| #include "platform/scroll/ScrollTypes.h"
|
| #include "platform/weborigin/SecurityPolicy.h"
|
| @@ -93,6 +94,7 @@ class CORE_EXPORT HTMLFrameOwnerElement : public HTMLElement,
|
| bool IsDisplayNone() const override { return !widget_; }
|
| AtomicString Csp() const override { return g_null_atom; }
|
| const WebVector<WebFeaturePolicyFeature>& AllowedFeatures() const override;
|
| + const WebParsedFeaturePolicy& ContainerPolicy() const override;
|
|
|
| DECLARE_VIRTUAL_TRACE();
|
|
|
| @@ -108,6 +110,19 @@ class CORE_EXPORT HTMLFrameOwnerElement : public HTMLElement,
|
| void DisposeWidgetSoon(FrameViewBase*);
|
| void FrameOwnerPropertiesChanged();
|
|
|
| + // Return the origin which is to be used for feature policy container
|
| + // policies, when a specific origin is needed. This supports the "allow"
|
| + // attribute, which uses the url specified by the parent document to determine
|
| + // the origin when the frame is constructed.
|
| + virtual const RefPtr<SecurityOrigin> GetOriginForFeaturePolicy() const {
|
| + return SecurityOrigin::CreateUnique();
|
| + }
|
| +
|
| + // Construct a new feature policy container policy for this frame, based on
|
| + // the frame attributes and the effective origin specified in the frame
|
| + // attributes.
|
| + void UpdateContainerPolicy();
|
| +
|
| private:
|
| // Intentionally private to prevent redundant checks when the type is
|
| // already HTMLFrameOwnerElement.
|
| @@ -123,6 +138,8 @@ class CORE_EXPORT HTMLFrameOwnerElement : public HTMLElement,
|
| Member<Frame> content_frame_;
|
| Member<FrameViewBase> widget_;
|
| SandboxFlags sandbox_flags_;
|
| +
|
| + WebParsedFeaturePolicy container_policy_;
|
| };
|
|
|
| DEFINE_ELEMENT_TYPE_CASTS(HTMLFrameOwnerElement, IsFrameOwnerElement());
|
|
|