Chromium Code Reviews| Index: content/child/runtime_features.cc |
| diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc |
| index ab8970952844ceb7d591792a01e32ebcf13ed779..f22e021185df813815ae2f957a358487fb1e4760 100644 |
| --- a/content/child/runtime_features.cc |
| +++ b/content/child/runtime_features.cc |
| @@ -15,6 +15,7 @@ |
| #include "content/common/content_switches_internal.h" |
| #include "content/public/common/content_features.h" |
| #include "content/public/common/content_switches.h" |
| +#include "media/base/media_switches.h" |
| #include "services/device/public/cpp/device_features.h" |
| #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
| #include "ui/gl/gl_switches.h" |
| @@ -49,10 +50,6 @@ static void SetRuntimeFeatureDefaultsForPlatform() { |
| WebRuntimeFeatures::EnableMediaControlsOverlayPlayButton(true); |
| #else // defined(OS_ANDROID) |
| WebRuntimeFeatures::EnableNavigatorContentUtils(true); |
| - if (base::FeatureList::IsEnabled( |
| - features::kCrossOriginMediaPlaybackRequiresUserGesture)) { |
| - WebRuntimeFeatures::EnableAutoplayMutedVideos(true); |
| - } |
| #endif // defined(OS_ANDROID) |
| #if defined(OS_ANDROID) || defined(USE_AURA) |
| @@ -383,6 +380,13 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( |
| if (base::FeatureList::IsEnabled(features::kIdleTimeSpellChecking)) |
| WebRuntimeFeatures::EnableFeatureFromString("IdleTimeSpellChecking", true); |
| +#if !defined(OS_ANDROID) |
|
whywhat
2017/04/24 18:06:24
nit: does it have to be #if-ed?
mlamouri (slow - plz ping)
2017/04/24 18:41:24
I want to avoid a super long CL so I'm keeping the
|
| + if (command_line.GetSwitchValueASCII(switches::kAutoplayPolicy) == |
| + switches::autoplay::kCrossOriginUserGestureRequiredPolicy) { |
| + WebRuntimeFeatures::EnableAutoplayMutedVideos(true); |
| + } |
| +#endif |
| + |
| // Enable explicitly enabled features, and then disable explicitly disabled |
| // ones. |
| if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { |