| 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 if (base::FeatureList::IsEnabled(features::kPassiveDocumentEventListeners)) | 256 if (base::FeatureList::IsEnabled(features::kPassiveDocumentEventListeners)) |
| 257 WebRuntimeFeatures::enablePassiveDocumentEventListeners(true); | 257 WebRuntimeFeatures::enablePassiveDocumentEventListeners(true); |
| 258 | 258 |
| 259 if (base::FeatureList::IsEnabled(features::kPassiveEventListenersDueToFling)) | 259 if (base::FeatureList::IsEnabled(features::kPassiveEventListenersDueToFling)) |
| 260 WebRuntimeFeatures::enablePassiveEventListenersDueToFling(true); | 260 WebRuntimeFeatures::enablePassiveEventListenersDueToFling(true); |
| 261 | 261 |
| 262 WebRuntimeFeatures::enableFeatureFromString( | 262 WebRuntimeFeatures::enableFeatureFromString( |
| 263 "FontCacheScaling", | 263 "FontCacheScaling", |
| 264 base::FeatureList::IsEnabled(features::kFontCacheScaling)); | 264 base::FeatureList::IsEnabled(features::kFontCacheScaling)); |
| 265 | 265 |
| 266 WebRuntimeFeatures::enableFeatureFromString( |
| 267 "FramebustingNeedsSameOriginOrUserGesture", |
| 268 base::FeatureList::IsEnabled( |
| 269 features::kFramebustingNeedsSameOriginOrUserGesture)); |
| 270 |
| 266 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) | 271 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) |
| 267 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); | 272 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); |
| 268 | 273 |
| 269 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling)) | 274 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling)) |
| 270 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false); | 275 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false); |
| 271 | 276 |
| 272 WebRuntimeFeatures::enableRenderingPipelineThrottling( | 277 WebRuntimeFeatures::enableRenderingPipelineThrottling( |
| 273 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); | 278 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); |
| 274 | 279 |
| 275 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames( | 280 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames( |
| (...skipping 26 matching lines...) Expand all Loading... |
| 302 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 307 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 303 std::vector<std::string> disabled_features = base::SplitString( | 308 std::vector<std::string> disabled_features = base::SplitString( |
| 304 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 309 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 305 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 310 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 306 for (const std::string& feature : disabled_features) | 311 for (const std::string& feature : disabled_features) |
| 307 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 312 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 308 } | 313 } |
| 309 } | 314 } |
| 310 | 315 |
| 311 } // namespace content | 316 } // namespace content |
| OLD | NEW |