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

Unified Diff: media/base/media_switches.h

Issue 2846623003: Make autoplay policies no longer platform dependant. (Closed)
Patch Set: bauerb review comments Created 3 years, 7 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 | « content/renderer/render_view_impl.cc ('k') | media/base/media_switches.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/media_switches.h
diff --git a/media/base/media_switches.h b/media/base/media_switches.h
index fbb84540d0e546186cd9dad77044401ca663b9ca..70c74dedc7b330d6e2b61e86f8ebb5ffe2748d79 100644
--- a/media/base/media_switches.h
+++ b/media/base/media_switches.h
@@ -13,6 +13,10 @@
#include "media/media_features.h"
#include "ppapi/features/features.h"
+namespace base {
+class CommandLine;
+}
+
namespace switches {
MEDIA_EXPORT extern const char kAudioBufferSize[];
@@ -81,9 +85,9 @@ MEDIA_EXPORT extern const char kIgnoreAutoplayRestrictionsForTests[];
namespace autoplay {
-MEDIA_EXPORT extern const char kCrossOriginUserGestureRequiredPolicy[];
MEDIA_EXPORT extern const char kNoUserGestureRequiredPolicy[];
MEDIA_EXPORT extern const char kUserGestureRequiredPolicy[];
+MEDIA_EXPORT extern const char kUserGestureRequiredForCrossOriginPolicy[];
} // namespace autoplay
@@ -120,6 +124,14 @@ MEDIA_EXPORT extern const base::Feature kD3D11VideoDecoding;
MEDIA_EXPORT extern const base::Feature kMediaFoundationH264Encoding;
#endif // defined(OS_WIN)
+// Based on a |command_line| and the current platform, returns the effective
+// autoplay policy. In other words, it will take into account the default policy
+// if none is specified via the command line and options passed for testing.
+// Returns one of the possible autoplay policy switches from the
+// switches::autoplay namespace.
+MEDIA_EXPORT std::string GetEffectiveAutoplayPolicy(
+ const base::CommandLine& command_line);
+
} // namespace media
#endif // MEDIA_BASE_MEDIA_SWITCHES_H_
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | media/base/media_switches.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698