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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 2921273002: Autoplay: add document user activation flag in chrome://flags (Closed)
Patch Set: Created 3 years, 6 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/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 ee95681349227e15eb1b535ffe2e75ebb6847c93..2a5d922282b7aee5671df909a1d1c1c81f7aecdb 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -466,6 +466,11 @@ WebPreferences RenderViewHostImpl::ComputeWebkitPrefs() {
} else if (autoplay_policy ==
switches::autoplay::kUserGestureRequiredForCrossOriginPolicy) {
prefs.autoplay_policy = AutoplayPolicy::kUserGestureRequiredForCrossOrigin;
+ } else if (autoplay_policy ==
+ switches::autoplay::kDocumentUserActivationRequiredPolicy) {
+ prefs.autoplay_policy = AutoplayPolicy::kDocumentUserActivationRequired;
+ } else {
+ NOTREACHED();
}
const std::string touch_enabled_switch =

Powered by Google App Engine
This is Rietveld 408576698