| 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 WebRuntimeFeatures::EnableTimerThrottlingForHiddenFrames( | 315 WebRuntimeFeatures::EnableTimerThrottlingForHiddenFrames( |
| 316 base::FeatureList::IsEnabled(features::kTimerThrottlingForHiddenFrames)); | 316 base::FeatureList::IsEnabled(features::kTimerThrottlingForHiddenFrames)); |
| 317 | 317 |
| 318 WebRuntimeFeatures::EnableTouchpadAndWheelScrollLatching( | 318 WebRuntimeFeatures::EnableTouchpadAndWheelScrollLatching( |
| 319 base::FeatureList::IsEnabled(features::kTouchpadAndWheelScrollLatching)); | 319 base::FeatureList::IsEnabled(features::kTouchpadAndWheelScrollLatching)); |
| 320 | 320 |
| 321 if (base::FeatureList::IsEnabled( | 321 if (base::FeatureList::IsEnabled( |
| 322 features::kSendBeaconThrowForBlobWithNonSimpleType)) | 322 features::kSendBeaconThrowForBlobWithNonSimpleType)) |
| 323 WebRuntimeFeatures::EnableSendBeaconThrowForBlobWithNonSimpleType(true); | 323 WebRuntimeFeatures::EnableSendBeaconThrowForBlobWithNonSimpleType(true); |
| 324 | 324 |
| 325 WebRuntimeFeatures::EnableAccessibilityObjectModel( | |
| 326 base::FeatureList::IsEnabled(features::kAccessibilityObjectModel)); | |
| 327 | |
| 328 #if defined(OS_ANDROID) | 325 #if defined(OS_ANDROID) |
| 329 if (command_line.HasSwitch(switches::kDisableMediaSessionAPI)) | 326 if (command_line.HasSwitch(switches::kDisableMediaSessionAPI)) |
| 330 WebRuntimeFeatures::EnableMediaSession(false); | 327 WebRuntimeFeatures::EnableMediaSession(false); |
| 331 #endif | 328 #endif |
| 332 | 329 |
| 333 WebRuntimeFeatures::EnablePaymentRequest( | 330 WebRuntimeFeatures::EnablePaymentRequest( |
| 334 base::FeatureList::IsEnabled(features::kWebPayments)); | 331 base::FeatureList::IsEnabled(features::kWebPayments)); |
| 335 | 332 |
| 336 WebRuntimeFeatures::EnableServiceWorkerNavigationPreload( | 333 WebRuntimeFeatures::EnableServiceWorkerNavigationPreload( |
| 337 base::FeatureList::IsEnabled(features::kServiceWorkerNavigationPreload)); | 334 base::FeatureList::IsEnabled(features::kServiceWorkerNavigationPreload)); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 390 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 394 std::vector<std::string> disabled_features = base::SplitString( | 391 std::vector<std::string> disabled_features = base::SplitString( |
| 395 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 392 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 396 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 393 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 397 for (const std::string& feature : disabled_features) | 394 for (const std::string& feature : disabled_features) |
| 398 WebRuntimeFeatures::EnableFeatureFromString(feature, false); | 395 WebRuntimeFeatures::EnableFeatureFromString(feature, false); |
| 399 } | 396 } |
| 400 } | 397 } |
| 401 | 398 |
| 402 } // namespace content | 399 } // namespace content |
| OLD | NEW |