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

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

Issue 2680083002: Initial Implementation of Iframe Attribute for Feature Policy (Part 1) (Closed)
Patch Set: Codereview: nit 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/Source/core/html/HTMLIFrameElementAllow.h
diff --git a/third_party/WebKit/Source/core/html/HTMLIFrameElementAllow.h b/third_party/WebKit/Source/core/html/HTMLIFrameElementAllow.h
new file mode 100644
index 0000000000000000000000000000000000000000..7f62d3a9f29fd09334076fdd7a4a0111430b906e
--- /dev/null
+++ b/third_party/WebKit/Source/core/html/HTMLIFrameElementAllow.h
@@ -0,0 +1,46 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef HTMLIFrameElementAllow_h
+#define HTMLIFrameElementAllow_h
+
+#include "core/CoreExport.h"
+#include "core/dom/DOMTokenList.h"
+#include "platform/heap/Handle.h"
+#include "public/platform/WebFeaturePolicy.h"
+
+namespace blink {
+
+class HTMLIFrameElement;
+
+class CORE_EXPORT HTMLIFrameElementAllow final : public DOMTokenList,
+ public DOMTokenListObserver {
+ USING_GARBAGE_COLLECTED_MIXIN(HTMLIFrameElementAllow);
+
+ public:
+ static HTMLIFrameElementAllow* create(HTMLIFrameElement* element) {
+ return new HTMLIFrameElementAllow(element);
+ }
+
+ ~HTMLIFrameElementAllow() override;
+
+ // Returns unique set of valid feature names.
+ Vector<WebFeaturePolicyFeature> parseAllowedFeatureNames(
+ String& invalidTokensErrorMessage) const;
+
+ DECLARE_VIRTUAL_TRACE();
+
+ private:
+ explicit HTMLIFrameElementAllow(HTMLIFrameElement*);
+ bool validateTokenValue(const AtomicString&, ExceptionState&) const override;
+
+ // DOMTokenListObserver.
+ void valueWasSet() override;
+
+ Member<HTMLIFrameElement> m_element;
+};
+
+} // namespace blink
+
+#endif // HTMLIFrameElementAllow_h

Powered by Google App Engine
This is Rietveld 408576698