Chromium Code Reviews| 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 312 WebRuntimeFeatures::enableTouchpadAndWheelScrollLatching( | 312 WebRuntimeFeatures::enableTouchpadAndWheelScrollLatching( |
| 313 base::FeatureList::IsEnabled(features::kTouchpadAndWheelScrollLatching)); | 313 base::FeatureList::IsEnabled(features::kTouchpadAndWheelScrollLatching)); |
| 314 | 314 |
| 315 if (base::FeatureList::IsEnabled( | 315 if (base::FeatureList::IsEnabled( |
| 316 features::kSendBeaconThrowForBlobWithNonSimpleType)) | 316 features::kSendBeaconThrowForBlobWithNonSimpleType)) |
| 317 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); | 317 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); |
| 318 | 318 |
| 319 #if defined(OS_ANDROID) | 319 #if defined(OS_ANDROID) |
| 320 if (command_line.HasSwitch(switches::kDisableMediaSessionAPI)) | 320 if (command_line.HasSwitch(switches::kDisableMediaSessionAPI)) |
| 321 WebRuntimeFeatures::enableMediaSession(false); | 321 WebRuntimeFeatures::enableMediaSession(false); |
| 322 #endif | |
|
please use gerrit instead
2017/02/27 15:56:17
I don't think this change is necessary. It's hard
Mathieu
2017/02/27 18:05:51
Unh. You're right. This is mysterious to me :)
| |
| 322 | 323 |
| 323 WebRuntimeFeatures::enablePaymentRequest( | 324 WebRuntimeFeatures::enablePaymentRequest( |
| 324 base::FeatureList::IsEnabled(features::kWebPayments)); | 325 base::FeatureList::IsEnabled(features::kWebPayments)); |
| 325 #endif | |
| 326 | 326 |
| 327 // Sets the RuntimeEnabledFeatures for Navigation Preload feature only when | 327 // Sets the RuntimeEnabledFeatures for Navigation Preload feature only when |
| 328 // '--enable-features' command line flag is given. While experimenting this | 328 // '--enable-features' command line flag is given. While experimenting this |
| 329 // feature using Origin-Trial, this base::Feature is enabled by default in | 329 // feature using Origin-Trial, this base::Feature is enabled by default in |
| 330 // content_features.cc. So FeatureList::IsEnabled() always returns true. But, | 330 // content_features.cc. So FeatureList::IsEnabled() always returns true. But, |
| 331 // unless the command line explicitly enabled the feature, this feature should | 331 // unless the command line explicitly enabled the feature, this feature should |
| 332 // be available only when a valid origin trial token is set. This check is | 332 // be available only when a valid origin trial token is set. This check is |
| 333 // done by the generated code of | 333 // done by the generated code of |
| 334 // blink::OriginTrials::serviceWorkerNavigationPreloadEnabled(). See the | 334 // blink::OriginTrials::serviceWorkerNavigationPreloadEnabled(). See the |
| 335 // comments in service_worker_version.h for the details. | 335 // comments in service_worker_version.h for the details. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 377 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 377 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 378 std::vector<std::string> disabled_features = base::SplitString( | 378 std::vector<std::string> disabled_features = base::SplitString( |
| 379 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 379 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 380 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 380 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 381 for (const std::string& feature : disabled_features) | 381 for (const std::string& feature : disabled_features) |
| 382 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 382 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 383 } | 383 } |
| 384 } | 384 } |
| 385 | 385 |
| 386 } // namespace content | 386 } // namespace content |
| OLD | NEW |