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 a2c03f79605f67d1a78cbbdc5b27ad6869d3a1f9..77ce4ea9a7068cd7f8b589f224c825ae7a5c7fb6 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 { |
@@ -22,6 +25,50 @@ struct WebFeaturePolicy { |
using WebParsedFeaturePolicy = WebVector<WebFeaturePolicy::ParsedWhitelist>; |
+enum class WebFeaturePolicyFeature { |
Rick Byers
2017/02/09 20:59:59
iclelland is landing this now in https://coderevie
lunalu1
2017/02/09 23:19:04
Yeah, but I think it might be easier for me to lan
|
+ NotFound = 0, |
+ DocumentCookie, |
+ DocumentDomain, |
+ DocumentWrite, |
+ Geolocation, |
+ Fullscreen, |
+ MidiFeature, |
+ Notifications, |
+ Payment, |
+ Push, |
+ SyncScript, |
+ SyncXHR, |
+ Usermedia, |
+ Vibrate, |
+ WebRTC, |
+ LAST_FEATURE = WebRTC |
+}; |
+ |
} // 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 |