| 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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( | 325 WebRuntimeFeatures::EnableAccessibilityObjectModel( |
| 326 base::FeatureList::IsEnabled(features::kAccessibilityObjectModel)); | 326 base::FeatureList::IsEnabled(features::kAccessibilityObjectModel)); |
| 327 | 327 |
| 328 #if defined(OS_ANDROID) | 328 #if defined(OS_ANDROID) |
| 329 if (command_line.HasSwitch(switches::kDisableMediaSessionAPI)) | 329 if (command_line.HasSwitch(switches::kDisableMediaSessionAPI)) |
| 330 WebRuntimeFeatures::EnableMediaSession(false); | 330 WebRuntimeFeatures::EnableMediaSession(false); |
| 331 #endif |
| 331 | 332 |
| 332 WebRuntimeFeatures::EnablePaymentRequest( | 333 WebRuntimeFeatures::EnablePaymentRequest( |
| 333 base::FeatureList::IsEnabled(features::kWebPayments)); | 334 base::FeatureList::IsEnabled(features::kWebPayments)); |
| 334 #endif | |
| 335 | 335 |
| 336 WebRuntimeFeatures::EnableServiceWorkerNavigationPreload( | 336 WebRuntimeFeatures::EnableServiceWorkerNavigationPreload( |
| 337 base::FeatureList::IsEnabled(features::kServiceWorkerNavigationPreload)); | 337 base::FeatureList::IsEnabled(features::kServiceWorkerNavigationPreload)); |
| 338 | 338 |
| 339 WebRuntimeFeatures::EnableOffMainThreadFetch( | 339 WebRuntimeFeatures::EnableOffMainThreadFetch( |
| 340 base::FeatureList::IsEnabled(features::kOffMainThreadFetch)); | 340 base::FeatureList::IsEnabled(features::kOffMainThreadFetch)); |
| 341 | 341 |
| 342 if (base::FeatureList::IsEnabled(features::kGamepadExtensions)) | 342 if (base::FeatureList::IsEnabled(features::kGamepadExtensions)) |
| 343 WebRuntimeFeatures::EnableGamepadExtensions(true); | 343 WebRuntimeFeatures::EnableGamepadExtensions(true); |
| 344 | 344 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 399 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 400 std::vector<std::string> disabled_features = base::SplitString( | 400 std::vector<std::string> disabled_features = base::SplitString( |
| 401 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 401 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 402 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 402 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 403 for (const std::string& feature : disabled_features) | 403 for (const std::string& feature : disabled_features) |
| 404 WebRuntimeFeatures::EnableFeatureFromString(feature, false); | 404 WebRuntimeFeatures::EnableFeatureFromString(feature, false); |
| 405 } | 405 } |
| 406 } | 406 } |
| 407 | 407 |
| 408 } // namespace content | 408 } // namespace content |
| OLD | NEW |