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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2698253002: [Blink>Media] Add Chrome feature for disabling autoplay unmuted in WebAPK (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/common/chrome_features.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index c4f6a7919fff6486c83be77353d61cc06628573a..bab9c38636f2a9e2dc2cfd2b1aad7a08f82a3777 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -2583,13 +2583,16 @@ void ChromeContentBrowserClient::OverrideWebkitPrefs(
web_prefs->data_saver_enabled = GetDataSaverEnabledPref(prefs);
#if defined(OS_ANDROID)
- content::WebContents* contents =
- content::WebContents::FromRenderViewHost(rvh);
- if (contents) {
- TabAndroid* tab_android = TabAndroid::FromWebContents(contents);
- if (tab_android) {
- web_prefs->media_playback_gesture_whitelist_scope =
- tab_android->GetWebappManifestScope();
+ if (base::FeatureList::IsEnabled(
+ features::kAllowAutoplayUnmutedInWebappManifestScope)) {
+ content::WebContents* contents =
+ content::WebContents::FromRenderViewHost(rvh);
+ if (contents) {
+ TabAndroid* tab_android = TabAndroid::FromWebContents(contents);
+ if (tab_android) {
+ web_prefs->media_playback_gesture_whitelist_scope =
+ tab_android->GetWebappManifestScope();
+ }
}
}
#endif // defined(OS_ANDROID)
« no previous file with comments | « no previous file | chrome/common/chrome_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698