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

Unified Diff: third_party/WebKit/public/platform/WebFeaturePolicy.h

Issue 2680083002: Initial Implementation of Iframe Attribute for Feature Policy (Part 1) (Closed)
Patch Set: Update rebase 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/public/platform/WebFeaturePolicy.h
diff --git a/third_party/WebKit/public/platform/WebFeaturePolicy.h b/third_party/WebKit/public/platform/WebFeaturePolicy.h
index 5b8bdfb1f800fa29abd3846567dcaa32383d6111..cd912a2368bbcdff2df260582dc98e0ea29cf770 100644
--- a/third_party/WebKit/public/platform/WebFeaturePolicy.h
+++ b/third_party/WebKit/public/platform/WebFeaturePolicy.h
@@ -8,6 +8,9 @@
#include "WebSecurityOrigin.h"
#include "WebString.h"
#include "WebVector.h"
+#if INSIDE_BLINK
+#include "wtf/HashSet.h"
+#endif
namespace blink {
@@ -61,4 +64,29 @@ using WebParsedFeaturePolicyHeader =
} // namespace blink
+#if INSIDE_BLINK
+namespace WTF {
+
+template <>
+struct DefaultHash<blink::WebFeaturePolicyFeature> {
+ STATIC_ONLY(DefaultHash);
+ using Hash = IntHash<blink::WebFeaturePolicyFeature>;
+};
+
+template <>
+struct HashTraits<blink::WebFeaturePolicyFeature>
+ : GenericHashTraits<blink::WebFeaturePolicyFeature> {
+ STATIC_ONLY(HashTraits);
+ static bool isDeletedValue(const blink::WebFeaturePolicyFeature& value) {
+ return value == static_cast<blink::WebFeaturePolicyFeature>(-1);
+ }
+ static void constructDeletedValue(blink::WebFeaturePolicyFeature& slot,
+ bool) {
+ slot = static_cast<blink::WebFeaturePolicyFeature>(-1);
+ }
+};
+
+} // namespace WTF
+#endif
+
#endif // WebFeaturePolicy_h

Powered by Google App Engine
This is Rietveld 408576698