| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 "FramebustingNeedsSameOriginOrUserGesture", | 274 "FramebustingNeedsSameOriginOrUserGesture", |
| 275 base::FeatureList::IsEnabled( | 275 base::FeatureList::IsEnabled( |
| 276 features::kFramebustingNeedsSameOriginOrUserGesture)); | 276 features::kFramebustingNeedsSameOriginOrUserGesture)); |
| 277 | 277 |
| 278 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) | 278 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) |
| 279 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); | 279 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); |
| 280 | 280 |
| 281 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling)) | 281 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling)) |
| 282 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false); | 282 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false); |
| 283 | 283 |
| 284 WebRuntimeFeatures::enableExpensiveBackgroundTimerThrottling( | |
| 285 base::FeatureList::IsEnabled( | |
| 286 features::kExpensiveBackgroundTimerThrottling)); | |
| 287 | |
| 288 WebRuntimeFeatures::enableRenderingPipelineThrottling( | 284 WebRuntimeFeatures::enableRenderingPipelineThrottling( |
| 289 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); | 285 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); |
| 290 | 286 |
| 291 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames( | 287 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames( |
| 292 base::FeatureList::IsEnabled(features::kTimerThrottlingForHiddenFrames)); | 288 base::FeatureList::IsEnabled(features::kTimerThrottlingForHiddenFrames)); |
| 293 | 289 |
| 294 if (base::FeatureList::IsEnabled( | 290 if (base::FeatureList::IsEnabled( |
| 295 features::kSendBeaconThrowForBlobWithNonSimpleType)) | 291 features::kSendBeaconThrowForBlobWithNonSimpleType)) |
| 296 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); | 292 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); |
| 297 | 293 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 322 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 318 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 323 std::vector<std::string> disabled_features = base::SplitString( | 319 std::vector<std::string> disabled_features = base::SplitString( |
| 324 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 320 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 325 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 321 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 326 for (const std::string& feature : disabled_features) | 322 for (const std::string& feature : disabled_features) |
| 327 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 323 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 328 } | 324 } |
| 329 } | 325 } |
| 330 | 326 |
| 331 } // namespace content | 327 } // namespace content |
| OLD | NEW |