| 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); | 297 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); |
| 298 | 298 |
| 299 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames( | 299 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames( |
| 300 base::FeatureList::IsEnabled(features::kTimerThrottlingForHiddenFrames)); | 300 base::FeatureList::IsEnabled(features::kTimerThrottlingForHiddenFrames)); |
| 301 | 301 |
| 302 if (base::FeatureList::IsEnabled( | 302 if (base::FeatureList::IsEnabled( |
| 303 features::kSendBeaconThrowForBlobWithNonSimpleType)) | 303 features::kSendBeaconThrowForBlobWithNonSimpleType)) |
| 304 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); | 304 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); |
| 305 | 305 |
| 306 #if defined(OS_ANDROID) | 306 #if defined(OS_ANDROID) |
| 307 if (command_line.HasSwitch(switches::kDisableMediaSessionAPI)) |
| 308 WebRuntimeFeatures::enableMediaSession(false); |
| 309 |
| 307 WebRuntimeFeatures::enablePaymentRequest( | 310 WebRuntimeFeatures::enablePaymentRequest( |
| 308 base::FeatureList::IsEnabled(features::kWebPayments)); | 311 base::FeatureList::IsEnabled(features::kWebPayments)); |
| 309 #endif | 312 #endif |
| 310 | 313 |
| 311 if (base::FeatureList::IsEnabled(features::kServiceWorkerNavigationPreload)) | 314 if (base::FeatureList::IsEnabled(features::kServiceWorkerNavigationPreload)) |
| 312 WebRuntimeFeatures::enableServiceWorkerNavigationPreload(true); | 315 WebRuntimeFeatures::enableServiceWorkerNavigationPreload(true); |
| 313 | 316 |
| 314 if (base::FeatureList::IsEnabled(features::kSpeculativeLaunchServiceWorker)) | 317 if (base::FeatureList::IsEnabled(features::kSpeculativeLaunchServiceWorker)) |
| 315 WebRuntimeFeatures::enableSpeculativeLaunchServiceWorker(true); | 318 WebRuntimeFeatures::enableSpeculativeLaunchServiceWorker(true); |
| 316 | 319 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 352 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 350 std::vector<std::string> disabled_features = base::SplitString( | 353 std::vector<std::string> disabled_features = base::SplitString( |
| 351 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 354 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 352 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 355 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 353 for (const std::string& feature : disabled_features) | 356 for (const std::string& feature : disabled_features) |
| 354 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 357 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 355 } | 358 } |
| 356 } | 359 } |
| 357 | 360 |
| 358 } // namespace content | 361 } // namespace content |
| OLD | NEW |