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

Unified Diff: media/base/media_util.h

Issue 2846623003: Make autoplay policies no longer platform dependant. (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_util.h
diff --git a/media/base/media_util.h b/media/base/media_util.h
index 0c459018cf2d14f32b74615f4b582c99ccdebc7f..66a3232d8f4565aaa7d67e742d504ae8fab4c519 100644
--- a/media/base/media_util.h
+++ b/media/base/media_util.h
@@ -6,11 +6,16 @@
#define MEDIA_BASE_MEDIA_UTIL_H_
#include <stdint.h>
+#include <string>
#include <vector>
#include "media/base/encryption_scheme.h"
#include "media/base/media_export.h"
+namespace base {
+class CommandLine;
+}
+
namespace media {
// Simply returns an empty vector. {Audio|Video}DecoderConfig are often
@@ -22,6 +27,14 @@ MEDIA_EXPORT std::vector<uint8_t> EmptyExtraData();
MEDIA_EXPORT EncryptionScheme Unencrypted();
MEDIA_EXPORT EncryptionScheme AesCtrEncryptionScheme();
+// Based on a |command_line| and the current platform, returns the effective
DaleCurtis 2017/04/27 18:59:39 Hmm, I didn't even know we had a media_util file,
mlamouri (slow - plz ping) 2017/04/27 21:34:14 I was considering having this in media_switches bu
+// 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_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698