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

Unified Diff: chrome/browser/about_flags.cc

Issue 2837023002: Create autoplay policy flag and merge cross-origin autoplay blocking into it. (Closed)
Patch Set: fix tests 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
« no previous file with comments | « no previous file | chrome/browser/flag_descriptions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/about_flags.cc
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 345c9281b4d9e18b141bf5aa2646db78219aeb9e..90b9e349e09b786f51bb9924f48a45c2b417142d 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -706,6 +706,21 @@ const FeatureEntry::Choice kEnableDefaultMediaSessionChoices[] = {
};
#endif // !defined(OS_ANDROID)
+const FeatureEntry::Choice kAutoplayPolicyChoices[] = {
+ {flags_ui::kGenericExperimentChoiceDefault, "", ""},
+ {flag_descriptions::kAutoplayPolicyNoUserGestureRequired,
+ switches::kAutoplayPolicy,
+ switches::autoplay::kNoUserGestureRequiredPolicy},
+#if defined(OS_ANDROID)
+ {flag_descriptions::kAutoplayPolicyUserGestureRequired,
+ switches::kAutoplayPolicy, switches::autoplay::kUserGestureRequiredPolicy},
+#else
+ {flag_descriptions::kAutoplayPolicyCrossOriginUserGestureRequired,
+ switches::kAutoplayPolicy,
+ switches::autoplay::kCrossOriginUserGestureRequiredPolicy},
+#endif
+};
+
const FeatureEntry::FeatureParam kNoStatePrefetchEnabled[] = {
{prerender::kNoStatePrefetchFeatureModeParameterName,
prerender::kNoStatePrefetchFeatureModeParameterPrefetch}};
@@ -1433,15 +1448,6 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kGestureRequirementForMediaPlaybackDescription, kOsAll,
SINGLE_DISABLE_VALUE_TYPE(
switches::kDisableGestureRequirementForMediaPlayback)},
-#if !defined(OS_ANDROID)
- {"cross-origin-media-playback-requires-user-gesture",
- flag_descriptions::kCrossOriginMediaPlaybackRequiresUserGestureName,
- flag_descriptions::kCrossOriginMediaPlaybackRequiresUserGestureDescription,
- kOsDesktop,
- FEATURE_VALUE_TYPE(
- features::kCrossOriginMediaPlaybackRequiresUserGesture)},
-#endif // !defined(OS_ANDROID)
-
#if defined(OS_CHROMEOS)
{"enable-virtual-keyboard", flag_descriptions::kVirtualKeyboardName,
flag_descriptions::kVirtualKeyboardDescription, kOsCrOS,
@@ -2759,6 +2765,10 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(omnibox::kEnableClipboardProvider)},
#endif
+ {"autoplay-policy", flag_descriptions::kAutoplayPolicyName,
+ flag_descriptions::kAutoplayPolicyDescription, kOsAll,
+ MULTI_VALUE_TYPE(kAutoplayPolicyChoices)},
+
// NOTE: Adding new command-line switches requires adding corresponding
// entries to enum "LoginCustomFlags" in histograms.xml. See note in
// histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
« no previous file with comments | « no previous file | chrome/browser/flag_descriptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698