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

Unified Diff: content/child/runtime_features.cc

Issue 2496593002: Adding an experimental flag to block autoplay with sound in cross-origin iframes (Closed)
Patch Set: nits Created 4 years 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 7c1e8326c02641076e5638bf33394b0fea9f5e2d..9ded7576ef42eaf18b5845f7cb6da4226e4a7f11 100644
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -44,8 +44,12 @@ static void SetRuntimeFeatureDefaultsForPlatform() {
WebRuntimeFeatures::enableAutoplayMutedVideos(true);
// Android does not yet support SystemMonitor.
WebRuntimeFeatures::enableOnDeviceChange(false);
-#else
+#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)
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698