| 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 if (base::FeatureList::IsEnabled(features::kPassiveDocumentEventListeners)) | 247 if (base::FeatureList::IsEnabled(features::kPassiveDocumentEventListeners)) |
| 248 WebRuntimeFeatures::enablePassiveDocumentEventListeners(true); | 248 WebRuntimeFeatures::enablePassiveDocumentEventListeners(true); |
| 249 | 249 |
| 250 if (base::FeatureList::IsEnabled(features::kPassiveEventListenersDueToFling)) | 250 if (base::FeatureList::IsEnabled(features::kPassiveEventListenersDueToFling)) |
| 251 WebRuntimeFeatures::enablePassiveEventListenersDueToFling(true); | 251 WebRuntimeFeatures::enablePassiveEventListenersDueToFling(true); |
| 252 | 252 |
| 253 WebRuntimeFeatures::enableFeatureFromString( | 253 WebRuntimeFeatures::enableFeatureFromString( |
| 254 "FontCacheScaling", | 254 "FontCacheScaling", |
| 255 base::FeatureList::IsEnabled(features::kFontCacheScaling)); | 255 base::FeatureList::IsEnabled(features::kFontCacheScaling)); |
| 256 | 256 |
| 257 if (!base::FeatureList::IsEnabled(features::kPaintOptimizations)) | |
| 258 WebRuntimeFeatures::enableFeatureFromString("PaintOptimizations", false); | |
| 259 | |
| 260 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) | 257 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) |
| 261 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); | 258 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); |
| 262 | 259 |
| 263 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling)) | 260 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling)) |
| 264 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false); | 261 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false); |
| 265 | 262 |
| 266 WebRuntimeFeatures::enableRenderingPipelineThrottling( | 263 WebRuntimeFeatures::enableRenderingPipelineThrottling( |
| 267 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); | 264 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); |
| 268 | 265 |
| 269 if (base::FeatureList::IsEnabled( | 266 if (base::FeatureList::IsEnabled( |
| (...skipping 20 matching lines...) Expand all Loading... |
| 290 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 287 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 291 std::vector<std::string> disabled_features = base::SplitString( | 288 std::vector<std::string> disabled_features = base::SplitString( |
| 292 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 289 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 293 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 290 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 294 for (const std::string& feature : disabled_features) | 291 for (const std::string& feature : disabled_features) |
| 295 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 292 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 296 } | 293 } |
| 297 } | 294 } |
| 298 | 295 |
| 299 } // namespace content | 296 } // namespace content |
| OLD | NEW |