summaryrefslogtreecommitdiffstats
path: root/chromium/content/renderer/media/crypto/key_systems.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/renderer/media/crypto/key_systems.h')
-rw-r--r--chromium/content/renderer/media/crypto/key_systems.h30
1 files changed, 18 insertions, 12 deletions
diff --git a/chromium/content/renderer/media/crypto/key_systems.h b/chromium/content/renderer/media/crypto/key_systems.h
index 2f4cb101b09..99825d1997a 100644
--- a/chromium/content/renderer/media/crypto/key_systems.h
+++ b/chromium/content/renderer/media/crypto/key_systems.h
@@ -11,20 +11,26 @@
#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
-namespace blink {
-class WebString;
-}
-
namespace content {
+// Prefixed EME API only supports prefixed (webkit-) key system name for
+// certain key systems. But internally only unprefixed key systems are
+// supported. The following two functions help convert between prefixed and
+// unprefixed key system names.
+
+// Gets the unprefixed key system name for |key_system|.
+std::string GetUnprefixedKeySystemName(const std::string& key_system);
+
+// Gets the prefixed key system name for |key_system|.
+std::string GetPrefixedKeySystemName(const std::string& key_system);
+
// Returns whether |key_system| is a real supported key system that can be
// instantiated.
// Abstract parent |key_system| strings will return false.
// Call IsSupportedKeySystemWithMediaMimeType() to determine whether a
// |key_system| supports a specific type of media or to check parent key
// systems.
-CONTENT_EXPORT bool IsConcreteSupportedKeySystem(
- const blink::WebString& key_system);
+CONTENT_EXPORT bool IsConcreteSupportedKeySystem(const std::string& key_system);
// Returns whether |key_sytem| supports the specified media type and codec(s).
CONTENT_EXPORT bool IsSupportedKeySystemWithMediaMimeType(
@@ -33,8 +39,6 @@ CONTENT_EXPORT bool IsSupportedKeySystemWithMediaMimeType(
const std::string& key_system);
// Returns a name for |key_system| suitable to UMA logging.
-CONTENT_EXPORT std::string KeySystemNameForUMA(
- const blink::WebString& key_system);
CONTENT_EXPORT std::string KeySystemNameForUMA(const std::string& key_system);
// Returns whether AesDecryptor can be used for the given |concrete_key_system|.
@@ -45,12 +49,14 @@ CONTENT_EXPORT bool CanUseAesDecryptor(const std::string& concrete_key_system);
// Returns empty string if |concrete_key_system| is unknown or not Pepper-based.
CONTENT_EXPORT std::string GetPepperType(
const std::string& concrete_key_system);
-#elif defined(OS_ANDROID)
-// Convert |concrete_key_system| to 16-byte Android UUID.
-CONTENT_EXPORT std::vector<uint8> GetUUID(
- const std::string& concrete_key_system);
#endif
+#if defined(UNIT_TEST)
+// Helper functions to add container/codec types for testing purposes.
+CONTENT_EXPORT void AddContainerMask(const std::string& container, uint32 mask);
+CONTENT_EXPORT void AddCodecMask(const std::string& codec, uint32 mask);
+#endif // defined(UNIT_TEST)
+
} // namespace content
#endif // CONTENT_RENDERER_MEDIA_CRYPTO_KEY_SYSTEMS_H_