| 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 256 |
| 257 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) | 257 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) |
| 258 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); | 258 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); |
| 259 | 259 |
| 260 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling)) | 260 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling)) |
| 261 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false); | 261 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false); |
| 262 | 262 |
| 263 WebRuntimeFeatures::enableRenderingPipelineThrottling( | 263 WebRuntimeFeatures::enableRenderingPipelineThrottling( |
| 264 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); | 264 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); |
| 265 | 265 |
| 266 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames( |
| 267 base::FeatureList::IsEnabled(features::kTimerThrottlingForHiddenFrames)); |
| 268 |
| 266 if (base::FeatureList::IsEnabled( | 269 if (base::FeatureList::IsEnabled( |
| 267 features::kSendBeaconThrowForBlobWithNonSimpleType)) | 270 features::kSendBeaconThrowForBlobWithNonSimpleType)) |
| 268 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); | 271 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); |
| 269 | 272 |
| 270 #if defined(OS_ANDROID) | 273 #if defined(OS_ANDROID) |
| 271 WebRuntimeFeatures::enablePaymentRequest( | 274 WebRuntimeFeatures::enablePaymentRequest( |
| 272 base::FeatureList::IsEnabled(features::kWebPayments)); | 275 base::FeatureList::IsEnabled(features::kWebPayments)); |
| 273 #endif | 276 #endif |
| 274 | 277 |
| 275 if (base::FeatureList::IsEnabled(features::kSpeculativeLaunchServiceWorker)) | 278 if (base::FeatureList::IsEnabled(features::kSpeculativeLaunchServiceWorker)) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 287 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 290 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 288 std::vector<std::string> disabled_features = base::SplitString( | 291 std::vector<std::string> disabled_features = base::SplitString( |
| 289 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 292 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 290 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 293 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 291 for (const std::string& feature : disabled_features) | 294 for (const std::string& feature : disabled_features) |
| 292 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 295 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 293 } | 296 } |
| 294 } | 297 } |
| 295 | 298 |
| 296 } // namespace content | 299 } // namespace content |
| OLD | NEW |