| 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 WebRuntimeFeatures::enableFeatureFromString( | 242 WebRuntimeFeatures::enableFeatureFromString( |
| 243 "FontCacheScaling", | 243 "FontCacheScaling", |
| 244 base::FeatureList::IsEnabled(features::kFontCacheScaling)); | 244 base::FeatureList::IsEnabled(features::kFontCacheScaling)); |
| 245 | 245 |
| 246 if (!base::FeatureList::IsEnabled(features::kPaintOptimizations)) | 246 if (!base::FeatureList::IsEnabled(features::kPaintOptimizations)) |
| 247 WebRuntimeFeatures::enableFeatureFromString("PaintOptimizations", false); | 247 WebRuntimeFeatures::enableFeatureFromString("PaintOptimizations", false); |
| 248 | 248 |
| 249 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) | 249 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) |
| 250 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); | 250 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); |
| 251 | 251 |
| 252 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling)) |
| 253 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false); |
| 254 |
| 252 WebRuntimeFeatures::enableRenderingPipelineThrottling( | 255 WebRuntimeFeatures::enableRenderingPipelineThrottling( |
| 253 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); | 256 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); |
| 254 | 257 |
| 255 if (base::FeatureList::IsEnabled( | 258 if (base::FeatureList::IsEnabled( |
| 256 features::kSendBeaconThrowForBlobWithNonSimpleType)) | 259 features::kSendBeaconThrowForBlobWithNonSimpleType)) |
| 257 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); | 260 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); |
| 258 | 261 |
| 259 #if defined(OS_ANDROID) | 262 #if defined(OS_ANDROID) |
| 260 WebRuntimeFeatures::enablePaymentRequest( | 263 WebRuntimeFeatures::enablePaymentRequest( |
| 261 base::FeatureList::IsEnabled(features::kWebPayments)); | 264 base::FeatureList::IsEnabled(features::kWebPayments)); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 276 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 279 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 277 std::vector<std::string> disabled_features = base::SplitString( | 280 std::vector<std::string> disabled_features = base::SplitString( |
| 278 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 281 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 279 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 282 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 280 for (const std::string& feature : disabled_features) | 283 for (const std::string& feature : disabled_features) |
| 281 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 284 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 282 } | 285 } |
| 283 } | 286 } |
| 284 | 287 |
| 285 } // namespace content | 288 } // namespace content |
| OLD | NEW |