OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/child/runtime_features.h" | 5 #include "content/child/runtime_features.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 241 |
242 if (!base::FeatureList::IsEnabled(features::kPaintOptimizations)) | 242 if (!base::FeatureList::IsEnabled(features::kPaintOptimizations)) |
243 WebRuntimeFeatures::enableFeatureFromString("PaintOptimizations", false); | 243 WebRuntimeFeatures::enableFeatureFromString("PaintOptimizations", false); |
244 | 244 |
245 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) | 245 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) |
246 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); | 246 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); |
247 | 247 |
248 WebRuntimeFeatures::enableRenderingPipelineThrottling( | 248 WebRuntimeFeatures::enableRenderingPipelineThrottling( |
249 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); | 249 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); |
250 | 250 |
| 251 #if defined(OS_ANDROID) |
| 252 WebRuntimeFeatures::enablePaymentRequest( |
| 253 base::FeatureList::IsEnabled(features::kPaymentRequest)); |
| 254 #endif |
| 255 |
251 // Enable explicitly enabled features, and then disable explicitly disabled | 256 // Enable explicitly enabled features, and then disable explicitly disabled |
252 // ones. | 257 // ones. |
253 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { | 258 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { |
254 std::vector<std::string> enabled_features = base::SplitString( | 259 std::vector<std::string> enabled_features = base::SplitString( |
255 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), | 260 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), |
256 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 261 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
257 for (const std::string& feature : enabled_features) | 262 for (const std::string& feature : enabled_features) |
258 WebRuntimeFeatures::enableFeatureFromString(feature, true); | 263 WebRuntimeFeatures::enableFeatureFromString(feature, true); |
259 } | 264 } |
260 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 265 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
261 std::vector<std::string> disabled_features = base::SplitString( | 266 std::vector<std::string> disabled_features = base::SplitString( |
262 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 267 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
263 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 268 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
264 for (const std::string& feature : disabled_features) | 269 for (const std::string& feature : disabled_features) |
265 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 270 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
266 } | 271 } |
267 } | 272 } |
268 | 273 |
269 } // namespace content | 274 } // namespace content |
OLD | NEW |