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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 if (command_line.HasSwitch(switches::kDisableMediaSessionAPI)) | 334 if (command_line.HasSwitch(switches::kDisableMediaSessionAPI)) |
335 WebRuntimeFeatures::EnableMediaSession(false); | 335 WebRuntimeFeatures::EnableMediaSession(false); |
336 | 336 |
337 WebRuntimeFeatures::EnablePaymentRequest( | 337 WebRuntimeFeatures::EnablePaymentRequest( |
338 base::FeatureList::IsEnabled(features::kWebPayments)); | 338 base::FeatureList::IsEnabled(features::kWebPayments)); |
339 #endif | 339 #endif |
340 | 340 |
341 WebRuntimeFeatures::EnableServiceWorkerNavigationPreload( | 341 WebRuntimeFeatures::EnableServiceWorkerNavigationPreload( |
342 base::FeatureList::IsEnabled(features::kServiceWorkerNavigationPreload)); | 342 base::FeatureList::IsEnabled(features::kServiceWorkerNavigationPreload)); |
343 | 343 |
| 344 WebRuntimeFeatures::EnableOffMainThreadFetch( |
| 345 base::FeatureList::IsEnabled(features::kOffMainThreadFetch)); |
| 346 |
344 if (base::FeatureList::IsEnabled(features::kGamepadExtensions)) | 347 if (base::FeatureList::IsEnabled(features::kGamepadExtensions)) |
345 WebRuntimeFeatures::EnableGamepadExtensions(true); | 348 WebRuntimeFeatures::EnableGamepadExtensions(true); |
346 | 349 |
347 if (base::FeatureList::IsEnabled(features::kCompositeOpaqueFixedPosition)) | 350 if (base::FeatureList::IsEnabled(features::kCompositeOpaqueFixedPosition)) |
348 WebRuntimeFeatures::EnableFeatureFromString("CompositeOpaqueFixedPosition", | 351 WebRuntimeFeatures::EnableFeatureFromString("CompositeOpaqueFixedPosition", |
349 true); | 352 true); |
350 | 353 |
351 if (!base::FeatureList::IsEnabled(features::kCompositeOpaqueScrollers)) | 354 if (!base::FeatureList::IsEnabled(features::kCompositeOpaqueScrollers)) |
352 WebRuntimeFeatures::EnableFeatureFromString("CompositeOpaqueScrollers", | 355 WebRuntimeFeatures::EnableFeatureFromString("CompositeOpaqueScrollers", |
353 false); | 356 false); |
(...skipping 27 matching lines...) Expand all Loading... |
381 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 384 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
382 std::vector<std::string> disabled_features = base::SplitString( | 385 std::vector<std::string> disabled_features = base::SplitString( |
383 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 386 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
384 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 387 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
385 for (const std::string& feature : disabled_features) | 388 for (const std::string& feature : disabled_features) |
386 WebRuntimeFeatures::EnableFeatureFromString(feature, false); | 389 WebRuntimeFeatures::EnableFeatureFromString(feature, false); |
387 } | 390 } |
388 } | 391 } |
389 | 392 |
390 } // namespace content | 393 } // namespace content |
OLD | NEW |