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

Unified Diff: content/browser/renderer_host/render_view_host_impl.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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/child/runtime_features.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index c65b5cb297e377bd7450ebee13e60199d29eaa03..0675ad9e6595220d193c554af7b27aa6500bd6eb 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -440,7 +440,11 @@ WebPreferences RenderViewHostImpl::ComputeWebkitPrefs() {
prefs.progress_bar_completion = GetProgressBarCompletionPolicy();
prefs.use_solid_color_scrollbars = true;
-#endif
+#else // defined(OS_ANDROID)
+ prefs.cross_origin_media_playback_requires_user_gesture =
+ base::FeatureList::GetInstance()->IsEnabled(
+ features::kCrossOriginMediaPlaybackRequiresUserGesture);
+#endif // defined(OS_ANDROID)
prefs.device_supports_touch = ui::GetTouchScreensAvailability() ==
ui::TouchScreensAvailability::ENABLED;
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/child/runtime_features.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698