| 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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 WebRuntimeFeatures::EnableFeatureFromString("CompositeOpaqueFixedPosition", | 349 WebRuntimeFeatures::EnableFeatureFromString("CompositeOpaqueFixedPosition", |
| 350 true); | 350 true); |
| 351 | 351 |
| 352 if (!base::FeatureList::IsEnabled(features::kCompositeOpaqueScrollers)) | 352 if (!base::FeatureList::IsEnabled(features::kCompositeOpaqueScrollers)) |
| 353 WebRuntimeFeatures::EnableFeatureFromString("CompositeOpaqueScrollers", | 353 WebRuntimeFeatures::EnableFeatureFromString("CompositeOpaqueScrollers", |
| 354 false); | 354 false); |
| 355 | 355 |
| 356 if (base::FeatureList::IsEnabled(features::kGenericSensor)) | 356 if (base::FeatureList::IsEnabled(features::kGenericSensor)) |
| 357 WebRuntimeFeatures::EnableGenericSensor(true); | 357 WebRuntimeFeatures::EnableGenericSensor(true); |
| 358 | 358 |
| 359 // Enable features which VrShell depends on. | |
| 360 if (base::FeatureList::IsEnabled(features::kVrShell)) { | |
| 361 WebRuntimeFeatures::EnableGamepadExtensions(true); | |
| 362 WebRuntimeFeatures::EnableWebVR(true); | |
| 363 } | |
| 364 | |
| 365 if (base::FeatureList::IsEnabled(features::kLoadingWithMojo)) | 359 if (base::FeatureList::IsEnabled(features::kLoadingWithMojo)) |
| 366 WebRuntimeFeatures::EnableLoadingWithMojo(true); | 360 WebRuntimeFeatures::EnableLoadingWithMojo(true); |
| 367 | 361 |
| 368 if (!base::FeatureList::IsEnabled(features::kBlockCredentialedSubresources)) { | 362 if (!base::FeatureList::IsEnabled(features::kBlockCredentialedSubresources)) { |
| 369 WebRuntimeFeatures::EnableFeatureFromString("BlockCredentialedSubresources", | 363 WebRuntimeFeatures::EnableFeatureFromString("BlockCredentialedSubresources", |
| 370 false); | 364 false); |
| 371 } | 365 } |
| 372 | 366 |
| 373 WebRuntimeFeatures::EnableFeatureFromString( | 367 WebRuntimeFeatures::EnableFeatureFromString( |
| 374 "AllowContentInitiatedDataUrlNavigations", | 368 "AllowContentInitiatedDataUrlNavigations", |
| (...skipping 27 matching lines...) Expand all Loading... |
| 402 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 396 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 403 std::vector<std::string> disabled_features = base::SplitString( | 397 std::vector<std::string> disabled_features = base::SplitString( |
| 404 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 398 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 405 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 399 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 406 for (const std::string& feature : disabled_features) | 400 for (const std::string& feature : disabled_features) |
| 407 WebRuntimeFeatures::EnableFeatureFromString(feature, false); | 401 WebRuntimeFeatures::EnableFeatureFromString(feature, false); |
| 408 } | 402 } |
| 409 } | 403 } |
| 410 | 404 |
| 411 } // namespace content | 405 } // namespace content |
| OLD | NEW |