| 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 296 |
| 297 if (base::FeatureList::IsEnabled( | 297 if (base::FeatureList::IsEnabled( |
| 298 features::kSendBeaconThrowForBlobWithNonSimpleType)) | 298 features::kSendBeaconThrowForBlobWithNonSimpleType)) |
| 299 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); | 299 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); |
| 300 | 300 |
| 301 #if defined(OS_ANDROID) | 301 #if defined(OS_ANDROID) |
| 302 WebRuntimeFeatures::enablePaymentRequest( | 302 WebRuntimeFeatures::enablePaymentRequest( |
| 303 base::FeatureList::IsEnabled(features::kWebPayments)); | 303 base::FeatureList::IsEnabled(features::kWebPayments)); |
| 304 #endif | 304 #endif |
| 305 | 305 |
| 306 if (base::FeatureList::IsEnabled(features::kServiceWorkerNavigationPreload)) |
| 307 WebRuntimeFeatures::enableServiceWorkerNavigationPreload(true); |
| 308 |
| 306 if (base::FeatureList::IsEnabled(features::kSpeculativeLaunchServiceWorker)) | 309 if (base::FeatureList::IsEnabled(features::kSpeculativeLaunchServiceWorker)) |
| 307 WebRuntimeFeatures::enableSpeculativeLaunchServiceWorker(true); | 310 WebRuntimeFeatures::enableSpeculativeLaunchServiceWorker(true); |
| 308 | 311 |
| 309 if (base::FeatureList::IsEnabled(features::kGamepadExtensions)) | 312 if (base::FeatureList::IsEnabled(features::kGamepadExtensions)) |
| 310 WebRuntimeFeatures::enableGamepadExtensions(true); | 313 WebRuntimeFeatures::enableGamepadExtensions(true); |
| 311 | 314 |
| 312 if (!base::FeatureList::IsEnabled(features::kCompositeOpaqueScrollers)) | 315 if (!base::FeatureList::IsEnabled(features::kCompositeOpaqueScrollers)) |
| 313 WebRuntimeFeatures::enableFeatureFromString("CompositeOpaqueScrollers", | 316 WebRuntimeFeatures::enableFeatureFromString("CompositeOpaqueScrollers", |
| 314 false); | 317 false); |
| 315 | 318 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 328 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 331 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 329 std::vector<std::string> disabled_features = base::SplitString( | 332 std::vector<std::string> disabled_features = base::SplitString( |
| 330 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 333 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 331 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 334 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 332 for (const std::string& feature : disabled_features) | 335 for (const std::string& feature : disabled_features) |
| 333 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 336 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 334 } | 337 } |
| 335 } | 338 } |
| 336 | 339 |
| 337 } // namespace content | 340 } // namespace content |
| OLD | NEW |