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

Side by Side Diff: third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp

Issue 2898503002: Reenable feature policy control over fullscreen (Closed)
Patch Set: Fixing last test nits Created 3 years, 4 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 | « third_party/WebKit/LayoutTests/resources/testharnessreport.js ('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 #include "platform/feature_policy/FeaturePolicy.h" 5 #include "platform/feature_policy/FeaturePolicy.h"
6 6
7 #include "platform/RuntimeEnabledFeatures.h" 7 #include "platform/RuntimeEnabledFeatures.h"
8 #include "platform/json/JSONValues.h" 8 #include "platform/json/JSONValues.h"
9 #include "platform/network/HTTPParsers.h" 9 #include "platform/network/HTTPParsers.h"
10 #include "platform/weborigin/SecurityOrigin.h" 10 #include "platform/weborigin/SecurityOrigin.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 whitelist.origins = origins; 80 whitelist.origins = origins;
81 whitelists.push_back(whitelist); 81 whitelists.push_back(whitelist);
82 } 82 }
83 } 83 }
84 return whitelists; 84 return whitelists;
85 } 85 }
86 86
87 bool IsSupportedInFeaturePolicy(WebFeaturePolicyFeature feature) { 87 bool IsSupportedInFeaturePolicy(WebFeaturePolicyFeature feature) {
88 if (!RuntimeEnabledFeatures::FeaturePolicyEnabled()) 88 if (!RuntimeEnabledFeatures::FeaturePolicyEnabled())
89 return false; 89 return false;
90
91 switch (feature) { 90 switch (feature) {
92 // TODO(loonybear): Re-enabled fullscreen in feature policy once tests have
93 // been updated.
94 // crbug.com/666761
95 case WebFeaturePolicyFeature::kFullscreen: 91 case WebFeaturePolicyFeature::kFullscreen:
96 return false;
97 case WebFeaturePolicyFeature::kPayment: 92 case WebFeaturePolicyFeature::kPayment:
98 case WebFeaturePolicyFeature::kUsb: 93 case WebFeaturePolicyFeature::kUsb:
99 return true; 94 return true;
100 case WebFeaturePolicyFeature::kVibrate: 95 case WebFeaturePolicyFeature::kVibrate:
101 return RuntimeEnabledFeatures::FeaturePolicyExperimentalFeaturesEnabled(); 96 return RuntimeEnabledFeatures::FeaturePolicyExperimentalFeaturesEnabled();
102 default: 97 default:
103 return false; 98 return false;
104 } 99 }
105 } 100 }
106 101
(...skipping 25 matching lines...) Expand all
132 default_feature_name_map.Set("sync-script", 127 default_feature_name_map.Set("sync-script",
133 WebFeaturePolicyFeature::kSyncScript); 128 WebFeaturePolicyFeature::kSyncScript);
134 default_feature_name_map.Set("sync-xhr", 129 default_feature_name_map.Set("sync-xhr",
135 WebFeaturePolicyFeature::kSyncXHR); 130 WebFeaturePolicyFeature::kSyncXHR);
136 } 131 }
137 } 132 }
138 return default_feature_name_map; 133 return default_feature_name_map;
139 } 134 }
140 135
141 } // namespace blink 136 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/resources/testharnessreport.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698