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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
310 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames( | 310 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames( |
311 base::FeatureList::IsEnabled(features::kTimerThrottlingForHiddenFrames)); | 311 base::FeatureList::IsEnabled(features::kTimerThrottlingForHiddenFrames)); |
312 | 312 |
313 WebRuntimeFeatures::enableTouchpadAndWheelScrollLatching( | 313 WebRuntimeFeatures::enableTouchpadAndWheelScrollLatching( |
314 base::FeatureList::IsEnabled(features::kTouchpadAndWheelScrollLatching)); | 314 base::FeatureList::IsEnabled(features::kTouchpadAndWheelScrollLatching)); |
315 | 315 |
316 if (base::FeatureList::IsEnabled( | 316 if (base::FeatureList::IsEnabled( |
317 features::kSendBeaconThrowForBlobWithNonSimpleType)) | 317 features::kSendBeaconThrowForBlobWithNonSimpleType)) |
318 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); | 318 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); |
319 | 319 |
320 WebRuntimeFeatures::enableAccessibilityObjectModel( | |
321 base::FeatureList::IsEnabled(features::kAccessibilityObjectModel)); | |
esprehn
2017/04/04 19:06:20
Why features:: instead of switches:: This is diffe
dmazzoni
2017/04/04 19:28:16
I think features are more flexible, right? We get
esprehn
2017/04/04 19:59:44
Ah okay that makes sense, is there a doc somewhere
| |
322 | |
320 #if defined(OS_ANDROID) | 323 #if defined(OS_ANDROID) |
321 if (command_line.HasSwitch(switches::kDisableMediaSessionAPI)) | 324 if (command_line.HasSwitch(switches::kDisableMediaSessionAPI)) |
322 WebRuntimeFeatures::enableMediaSession(false); | 325 WebRuntimeFeatures::enableMediaSession(false); |
323 | 326 |
324 WebRuntimeFeatures::enablePaymentRequest( | 327 WebRuntimeFeatures::enablePaymentRequest( |
325 base::FeatureList::IsEnabled(features::kWebPayments)); | 328 base::FeatureList::IsEnabled(features::kWebPayments)); |
326 #endif | 329 #endif |
327 | 330 |
328 // Sets the RuntimeEnabledFeatures for Navigation Preload feature only when | 331 // Sets the RuntimeEnabledFeatures for Navigation Preload feature only when |
329 // '--enable-features' command line flag is given. While experimenting this | 332 // '--enable-features' command line flag is given. While experimenting this |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
380 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 383 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
381 std::vector<std::string> disabled_features = base::SplitString( | 384 std::vector<std::string> disabled_features = base::SplitString( |
382 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 385 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
383 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 386 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
384 for (const std::string& feature : disabled_features) | 387 for (const std::string& feature : disabled_features) |
385 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 388 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
386 } | 389 } |
387 } | 390 } |
388 | 391 |
389 } // namespace content | 392 } // namespace content |
OLD | NEW |