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

Unified Diff: third_party/WebKit/Source/core/html/HTMLFrameElementBase.h

Issue 2797813002: Replicate feature policy container policies. (Closed)
Patch Set: Addressing review comments Created 3 years, 8 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/Source/core/html/HTMLFrameElementBase.h
diff --git a/third_party/WebKit/Source/core/html/HTMLFrameElementBase.h b/third_party/WebKit/Source/core/html/HTMLFrameElementBase.h
index 631685f8d495a5466ee8a50a0aed32d9d1a023ff..3e3a5d5efdfd851e98f218316285d111b945c8c5 100644
--- a/third_party/WebKit/Source/core/html/HTMLFrameElementBase.h
+++ b/third_party/WebKit/Source/core/html/HTMLFrameElementBase.h
@@ -40,9 +40,12 @@ class CORE_EXPORT HTMLFrameElementBase : public HTMLFrameOwnerElement {
int MarginHeight() const final { return margin_height_; }
protected:
+ friend class HTMLIFrameElementTest;
+
HTMLFrameElementBase(const QualifiedName&, Document&);
void ParseAttribute(const AttributeModificationParams&) override;
+
InsertionNotificationRequest InsertedInto(ContainerNode*) override;
void DidNotifySubtreeInsertionsToDocument() final;
void AttachLayoutTree(const AttachContext& = AttachContext()) override;
@@ -51,6 +54,14 @@ class CORE_EXPORT HTMLFrameElementBase : public HTMLFrameOwnerElement {
void SetMarginWidth(int);
void SetMarginHeight(int);
+ // Return the origin which is to be used for feature policy container
+ // policies, when the "allow" attribute is used. When that attribute is used,
+ // the feature policy which is constructed should only allow a given feature
+ // on the origin which is specified by the frame's "src" attribute.
+ // It also takes into account details such as the frame's sandbox status, and
+ // whether the frame should inherit its parent's origin.
+ RefPtr<SecurityOrigin> GetOriginForFeaturePolicy() const override;
+
private:
bool SupportsFocus() const final;
void SetFocused(bool, WebFocusType) final;
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrameClient.h ('k') | third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698