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

Unified Diff: content/renderer/media/crypto/key_systems_info.h

Issue 23464005: Explicitly register each key system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Clear Key on Android Created 7 years, 4 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/media/crypto/key_systems.cc ('k') | content/renderer/media/crypto/key_systems_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/crypto/key_systems_info.h
diff --git a/content/renderer/media/crypto/key_systems_info.h b/content/renderer/media/crypto/key_systems_info.h
index b36fc13bf162d4dad171e1d2e728fe885fa50b33..1aaa68a8540f0934b1cfc4b00b16b3bf732eb195 100644
--- a/content/renderer/media/crypto/key_systems_info.h
+++ b/content/renderer/media/crypto/key_systems_info.h
@@ -15,79 +15,18 @@ class WebString;
namespace content {
-struct MediaFormatAndKeySystem {
- const char* mime_type;
- const char* codecs_list;
- const char* key_system;
-};
-
-#if defined(ENABLE_PEPPER_CDMS)
-struct KeySystemPepperTypePair {
- const char* key_system;
- const char* type;
-};
-#endif // defined(ENABLE_PEPPER_CDMS)
-
-#if defined(OS_ANDROID)
-struct KeySystemUUIDPair {
- const char* key_system;
- const uint8 uuid[16];
-};
-#endif // defined(OS_ANDROID)
-
-// Specifies the container and codec combinations supported by individual
-// key systems. Each line is a container-codecs combination and the key system
-// that supports it. Multiple codecs can be listed. In all cases, the container
-// without a codec is also supported.
-// This list is converted at runtime into individual container-codec-key system
-// entries in KeySystems::key_system_map_.
-extern const MediaFormatAndKeySystem kSupportedFormatKeySystemCombinations[];
-extern const int kNumSupportedFormatKeySystemCombinations;
-
-#if defined(ENABLE_PEPPER_CDMS)
-// There should be one entry for each key system.
-extern const KeySystemPepperTypePair kKeySystemToPepperTypeMapping[];
-extern const int kNumKeySystemToPepperTypeMapping;
-#endif // defined(ENABLE_PEPPER_CDMS)
-
-#if defined(OS_ANDROID)
-// Mapping from key system to UUID, one entry per key system.
-extern const KeySystemUUIDPair kKeySystemToUUIDMapping[];
-extern const int kNumKeySystemToUUIDMapping;
-#endif // defined(OS_ANDROID)
-
-// Returns a concrete key system supported by the platform that most closely
-// corresponds to |key_system|. The result can be passed to other functions that
-// require a concrete key system.
-// Returns null if a conversion cannot be made or |key_system| is unrecognized.
-// The primary use case is to convert a parent key system to a concrete key
-// system to check properties.
-// If we ever have multiple children for a single parent, we may need a more
-// complex solution that checks all concrete children until it gets true.
-std::string EnsureConcreteKeySystem(const std::string& key_system);
-
-// Returns whether |key_system| is a concrete key system.
-// This is used for DCHECKs. Production code should use
-// EnsureConcreteKeySystem().
-inline bool IsConcreteKeySystem(const std::string& key_system) {
- return !key_system.empty() &&
- key_system == EnsureConcreteKeySystem(key_system);
-}
-
-// Returns true if there is a known incompatibility with the operating system.
-bool IsOSIncompatible(const std::string& actual_key_system);
+// TODO(ddorwin): Move registration to ContentClient.
+void RegisterKeySystems();
// Returns true if canPlayType should return an empty string for |key_system|.
bool IsCanPlayTypeSuppressed(const std::string& key_system);
// Returns the name that UMA will use for the given |key_system|.
// This function can be called frequently. Hence this function should be
-// implemented not to impact performance.
+// implemented not to impact performance and does not rely on the main
+// key system map.
std::string KeySystemNameForUMAInternal(const WebKit::WebString& key_system);
-// Returns whether built-in AesDecryptor can be used for the given |key_system|.
-bool CanUseAesDecryptorInternal(const std::string& key_system);
-
} // namespace content
#endif // CONTENT_RENDERER_MEDIA_CRYPTO_KEY_SYSTEMS_INFO_H_
« no previous file with comments | « content/renderer/media/crypto/key_systems.cc ('k') | content/renderer/media/crypto/key_systems_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698