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

Unified Diff: third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp

Issue 2873433002: Enable Feature Policy without experimental features or fullscreen (Closed)
Patch Set: Fix test failure (fullscreen is still behind FeaturePolicy flag and only disabled in-place of IsSup… Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp
diff --git a/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp b/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp
index f89c965b35075a0057e00fe885d3e977f2c26074..74d15ee8ecb9da9d538015e35676f3326e495a64 100644
--- a/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp
+++ b/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp
@@ -128,6 +128,22 @@ WebParsedFeaturePolicy GetContainerPolicyFromAllowedFeatures(
return whitelists;
}
+bool IsSupportedInFeaturePolicy(WebFeaturePolicyFeature feature) {
+ switch (feature) {
+ // TODO(lunalu): Re-enabled fullscreen in feature policy once tests have
+ // been updated.
+ // crbug.com/666761
+ case WebFeaturePolicyFeature::kFullscreen:
+ return false;
+ case WebFeaturePolicyFeature::kPayment:
+ return true;
+ case WebFeaturePolicyFeature::kVibrate:
+ return RuntimeEnabledFeatures::featurePolicyExperimentalFeaturesEnabled();
+ default:
+ return false;
+ }
+}
+
const FeatureNameMap& GetDefaultFeatureNameMap() {
DEFINE_STATIC_LOCAL(FeatureNameMap, default_feature_name_map, ());
if (default_feature_name_map.IsEmpty()) {
« no previous file with comments | « third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698