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

Unified Diff: media/base/media_switches.h

Issue 2837023002: Create autoplay policy flag and merge cross-origin autoplay blocking into it. (Closed)
Patch Set: 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
Index: media/base/media_switches.h
diff --git a/media/base/media_switches.h b/media/base/media_switches.h
index b2234d1a2a9ff861c265f6e3f643da3aff6c0e1a..0b688d7b5aff22a3d30ab11231505938e0347d7b 100644
--- a/media/base/media_switches.h
+++ b/media/base/media_switches.h
@@ -17,6 +17,8 @@ namespace switches {
MEDIA_EXPORT extern const char kAudioBufferSize[];
+MEDIA_EXPORT extern const char kAutoplayPolicy[];
+
MEDIA_EXPORT extern const char kVideoThreads[];
MEDIA_EXPORT extern const char kEnableMediaSuspend[];
@@ -75,6 +77,14 @@ MEDIA_EXPORT extern const char kForceVideoOverlays[];
MEDIA_EXPORT extern const char kMSEAudioBufferSizeLimit[];
MEDIA_EXPORT extern const char kMSEVideoBufferSizeLimit[];
+namespace autoplay {
+
+MEDIA_EXPORT extern const char kCrossOriginUserGestureRequiredPolicy[];
+MEDIA_EXPORT extern const char kUserGestureRequiredPolicy[];
+MEDIA_EXPORT extern const char kNoRestrictionsPolicy[];
+
+} // namespace autoplay
+
} // namespace switches
namespace media {
@@ -82,11 +92,7 @@ namespace media {
// All features in alphabetical order. The features should be documented
// alongside the definition of their values in the .cc file.
-#if defined(OS_WIN)
-MEDIA_EXPORT extern const base::Feature kD3D11VideoDecoding;
-MEDIA_EXPORT extern const base::Feature kMediaFoundationH264Encoding;
-#endif // defined(OS_WIN)
-
+MEDIA_EXPORT extern const base::Feature kAutoplayPolicy;
MEDIA_EXPORT extern const base::Feature kNewAudioRenderingMixingStrategy;
MEDIA_EXPORT extern const base::Feature kOverlayFullscreenVideo;
MEDIA_EXPORT extern const base::Feature kResumeBackgroundVideo;
@@ -103,6 +109,12 @@ MEDIA_EXPORT extern const base::Feature kAndroidMediaPlayerRenderer;
MEDIA_EXPORT extern const base::Feature kVideoFullscreenOrientationLock;
MEDIA_EXPORT extern const base::Feature kMediaDrmPersistentLicense;
#endif // defined(OS_ANDROID)
+
+#if defined(OS_WIN)
+MEDIA_EXPORT extern const base::Feature kD3D11VideoDecoding;
+MEDIA_EXPORT extern const base::Feature kMediaFoundationH264Encoding;
+#endif // defined(OS_WIN)
+
} // namespace media
#endif // MEDIA_BASE_MEDIA_SWITCHES_H_

Powered by Google App Engine
This is Rietveld 408576698