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

Side by Side Diff: third_party/WebKit/public/platform/WebFeaturePolicy.h

Issue 2655663004: Introduce content-side Feature Policy object and maintain in parallel with renderer policy. (Closed)
Patch Set: Add comments for public enum members 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 unified diff | Download patch
« no previous file with comments | « content/test/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // These values map to the features which can be controlled by Feature Policy.
15 // TODO(iclelland): Link to the spec where the behaviour for each of these is
16 // defined.
17 enum class WebFeaturePolicyFeature {
18 NotFound = 0,
19 // Controls access to document.cookie attribute.
20 DocumentCookie,
21 // Contols access to document.domain attribute.
22 DocumentDomain,
23 // Controls access to document.write and document.writeln methods.
24 DocumentWrite,
25 // Controls whether Element.requestFullscreen is allowed.
26 Fullscreen,
27 // Controls access to Geolocation interface.
28 Geolocation,
29 // Controls access to requestMIDIAccess method.
30 MidiFeature,
31 // Controls access to Notification interface.
32 Notifications,
33 // Controls access to PaymentRequest interface.
34 Payment,
35 // Controls access to PushManager interface.
36 Push,
37 // Controls whether synchronous script elements will run.
38 SyncScript,
39 // Controls use of synchronous XMLHTTPRequest API.
40 SyncXHR,
41 // Controls access to NavigatorUserMedia interface.
42 Usermedia,
43 // Controls access to navigator.vibrate method.
44 Vibrate,
45 // Controls access to RTCPeerConnection interface.
46 WebRTC,
47 LAST_FEATURE = WebRTC
48 };
49
14 struct WebParsedFeaturePolicyDeclaration { 50 struct WebParsedFeaturePolicyDeclaration {
15 WebParsedFeaturePolicyDeclaration() : matchesAllOrigins(false) {} 51 WebParsedFeaturePolicyDeclaration() : matchesAllOrigins(false) {}
16 WebString featureName; 52 WebString featureName;
17 bool matchesAllOrigins; 53 bool matchesAllOrigins;
18 WebVector<WebSecurityOrigin> origins; 54 WebVector<WebSecurityOrigin> origins;
19 }; 55 };
20 56
21 // Used in Blink code to represent parsed headers. Used for IPC between renderer 57 // Used in Blink code to represent parsed headers. Used for IPC between renderer
22 // and browser. 58 // and browser.
23 using WebParsedFeaturePolicyHeader = 59 using WebParsedFeaturePolicyHeader =
24 WebVector<WebParsedFeaturePolicyDeclaration>; 60 WebVector<WebParsedFeaturePolicyDeclaration>;
25 61
26 } // namespace blink 62 } // namespace blink
27 63
28 #endif // WebFeaturePolicy_h 64 #endif // WebFeaturePolicy_h
OLDNEW
« no previous file with comments | « content/test/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698