Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(888)

Unified Diff: content/child/runtime_features.cc

Issue 2846623003: Make autoplay policies no longer platform dependant. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/child/runtime_features.cc
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
index ec86af9a578d3d2b71bb1ec2d732211c8dd3e9c4..dd31dfd266a19afc646e34fc94345035ef7e980c 100644
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -16,6 +16,7 @@
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
#include "media/base/media_switches.h"
+#include "media/base/media_util.h"
#include "services/device/public/cpp/device_features.h"
#include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
#include "ui/gl/gl_switches.h"
@@ -383,12 +384,10 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
if (base::FeatureList::IsEnabled(features::kIdleTimeSpellChecking))
WebRuntimeFeatures::EnableFeatureFromString("IdleTimeSpellChecking", true);
-#if !defined(OS_ANDROID)
- if (command_line.GetSwitchValueASCII(switches::kAutoplayPolicy) ==
- switches::autoplay::kCrossOriginUserGestureRequiredPolicy) {
+ if (media::GetEffectiveAutoplayPolicy(command_line) !=
+ switches::autoplay::kNoUserGestureRequiredPolicy) {
WebRuntimeFeatures::EnableAutoplayMutedVideos(true);
}
-#endif
// Enable explicitly enabled features, and then disable explicitly disabled
// ones.

Powered by Google App Engine
This is Rietveld 408576698