| 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 FeaturePolicy_h | 5 #ifndef FeaturePolicy_h |
| 6 #define FeaturePolicy_h | 6 #define FeaturePolicy_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/weborigin/SecurityOrigin.h" | 9 #include "platform/weborigin/SecurityOrigin.h" |
| 10 #include "platform/wtf/HashMap.h" | 10 #include "platform/wtf/HashMap.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 // Converts a JSON feature policy string into a vector of whitelists (see | 35 // Converts a JSON feature policy string into a vector of whitelists (see |
| 36 // comments above), with an explicit FeatureNameMap. This method is primarily | 36 // comments above), with an explicit FeatureNameMap. This method is primarily |
| 37 // used for testing. | 37 // used for testing. |
| 38 PLATFORM_EXPORT WebParsedFeaturePolicy | 38 PLATFORM_EXPORT WebParsedFeaturePolicy |
| 39 ParseFeaturePolicy(const String& policy, | 39 ParseFeaturePolicy(const String& policy, |
| 40 RefPtr<SecurityOrigin>, | 40 RefPtr<SecurityOrigin>, |
| 41 Vector<String>* messages, | 41 Vector<String>* messages, |
| 42 const FeatureNameMap& feature_names); | 42 const FeatureNameMap& feature_names); |
| 43 | 43 |
| 44 // Given a vector of WebFeaturePolicyFeatures and an origin, creates a vector of | |
| 45 // whitelists, one for each feature specified. | |
| 46 PLATFORM_EXPORT WebParsedFeaturePolicy GetContainerPolicyFromAllowedFeatures( | |
| 47 const WebVector<WebFeaturePolicyFeature>& features, | |
| 48 bool allowfullscreen, | |
| 49 bool allowpayment, | |
| 50 RefPtr<SecurityOrigin>); | |
| 51 | |
| 52 // Verifies whether feature policy is enabled and |feature| is supported in | 44 // Verifies whether feature policy is enabled and |feature| is supported in |
| 53 // feature policy. | 45 // feature policy. |
| 54 PLATFORM_EXPORT bool IsSupportedInFeaturePolicy(WebFeaturePolicyFeature); | 46 PLATFORM_EXPORT bool IsSupportedInFeaturePolicy(WebFeaturePolicyFeature); |
| 55 | 47 |
| 56 } // namespace blink | 48 } // namespace blink |
| 57 | 49 |
| 58 #endif // FeaturePolicy_h | 50 #endif // FeaturePolicy_h |
| OLD | NEW |