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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) | 286 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) |
287 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); | 287 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); |
288 | 288 |
289 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling)) | 289 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling)) |
290 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false); | 290 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false); |
291 | 291 |
292 WebRuntimeFeatures::enableExpensiveBackgroundTimerThrottling( | 292 WebRuntimeFeatures::enableExpensiveBackgroundTimerThrottling( |
293 base::FeatureList::IsEnabled( | 293 base::FeatureList::IsEnabled( |
294 features::kExpensiveBackgroundTimerThrottling)); | 294 features::kExpensiveBackgroundTimerThrottling)); |
295 | 295 |
| 296 if (base::FeatureList::IsEnabled(features::kHeapCompaction)) |
| 297 WebRuntimeFeatures::enableHeapCompaction(true); |
| 298 |
296 WebRuntimeFeatures::enableRenderingPipelineThrottling( | 299 WebRuntimeFeatures::enableRenderingPipelineThrottling( |
297 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); | 300 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); |
298 | 301 |
299 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames( | 302 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames( |
300 base::FeatureList::IsEnabled(features::kTimerThrottlingForHiddenFrames)); | 303 base::FeatureList::IsEnabled(features::kTimerThrottlingForHiddenFrames)); |
301 | 304 |
302 if (base::FeatureList::IsEnabled( | 305 if (base::FeatureList::IsEnabled( |
303 features::kSendBeaconThrowForBlobWithNonSimpleType)) | 306 features::kSendBeaconThrowForBlobWithNonSimpleType)) |
304 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); | 307 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); |
305 | 308 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 352 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
350 std::vector<std::string> disabled_features = base::SplitString( | 353 std::vector<std::string> disabled_features = base::SplitString( |
351 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 354 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
352 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 355 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
353 for (const std::string& feature : disabled_features) | 356 for (const std::string& feature : disabled_features) |
354 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 357 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
355 } | 358 } |
356 } | 359 } |
357 | 360 |
358 } // namespace content | 361 } // namespace content |
OLD | NEW |