| 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)); |
| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 386 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 384 std::vector<std::string> disabled_features = base::SplitString( | 387 std::vector<std::string> disabled_features = base::SplitString( |
| 385 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 388 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 386 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 389 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 387 for (const std::string& feature : disabled_features) | 390 for (const std::string& feature : disabled_features) |
| 388 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 391 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 389 } | 392 } |
| 390 } | 393 } |
| 391 | 394 |
| 392 } // namespace content | 395 } // namespace content |
| OLD | NEW |