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