OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WebFeaturePolicy_h | 5 #ifndef WebFeaturePolicy_h |
6 #define WebFeaturePolicy_h | 6 #define WebFeaturePolicy_h |
7 | 7 |
8 #include "WebSecurityOrigin.h" | 8 #include "WebSecurityOrigin.h" |
9 #include "WebString.h" | 9 #include "WebString.h" |
10 #include "WebVector.h" | 10 #include "WebVector.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 enum class WebFeaturePolicyFeature { | |
Rick Byers
2017/02/09 20:40:14
nit: we generally try to write detailed comments f
iclelland
2017/02/09 21:01:00
Done, thanks!
| |
15 NotFound = 0, | |
16 DocumentCookie, | |
17 DocumentDomain, | |
18 DocumentWrite, | |
19 Geolocation, | |
20 Fullscreen, | |
21 MidiFeature, | |
22 Notifications, | |
23 Payment, | |
24 Push, | |
25 SyncScript, | |
26 SyncXHR, | |
27 Usermedia, | |
28 Vibrate, | |
29 WebRTC, | |
30 LAST_FEATURE = WebRTC | |
31 }; | |
32 | |
14 struct WebParsedFeaturePolicyDeclaration { | 33 struct WebParsedFeaturePolicyDeclaration { |
15 WebParsedFeaturePolicyDeclaration() : matchesAllOrigins(false) {} | 34 WebParsedFeaturePolicyDeclaration() : matchesAllOrigins(false) {} |
16 WebString featureName; | 35 WebString featureName; |
17 bool matchesAllOrigins; | 36 bool matchesAllOrigins; |
18 WebVector<WebSecurityOrigin> origins; | 37 WebVector<WebSecurityOrigin> origins; |
19 }; | 38 }; |
20 | 39 |
21 // Used in Blink code to represent parsed headers. Used for IPC between renderer | 40 // Used in Blink code to represent parsed headers. Used for IPC between renderer |
22 // and browser. | 41 // and browser. |
23 using WebParsedFeaturePolicyHeader = | 42 using WebParsedFeaturePolicyHeader = |
24 WebVector<WebParsedFeaturePolicyDeclaration>; | 43 WebVector<WebParsedFeaturePolicyDeclaration>; |
25 | 44 |
26 } // namespace blink | 45 } // namespace blink |
27 | 46 |
28 #endif // WebFeaturePolicy_h | 47 #endif // WebFeaturePolicy_h |
OLD | NEW |