| Index: media/base/android/media_drm_bridge.cc
|
| diff --git a/media/base/android/media_drm_bridge.cc b/media/base/android/media_drm_bridge.cc
|
| index fc0288ab77381376ccbce06caf3035d0f1fe86ca..60215ea6148437cab339d3e67cb287443f3b2ed8 100644
|
| --- a/media/base/android/media_drm_bridge.cc
|
| +++ b/media/base/android/media_drm_bridge.cc
|
| @@ -73,6 +73,7 @@ class KeySystemUuidManager {
|
| KeySystemUuidManager();
|
| UUID GetUUID(const std::string& key_system);
|
| void AddMapping(const std::string& key_system, const UUID& uuid);
|
| + std::vector<std::string> GetPlatformKeySystemNames();
|
|
|
| private:
|
| typedef base::hash_map<std::string, UUID> KeySystemUuidMap;
|
| @@ -105,6 +106,17 @@ void KeySystemUuidManager::AddMapping(const std::string& key_system,
|
| key_system_uuid_map_[key_system] = uuid;
|
| }
|
|
|
| +std::vector<std::string> KeySystemUuidManager::GetPlatformKeySystemNames() {
|
| + std::vector<std::string> key_systems;
|
| + for (KeySystemUuidMap::iterator it = key_system_uuid_map_.begin();
|
| + it != key_system_uuid_map_.end(); ++it) {
|
| + // Rule out the key system handled by Chrome explicitly.
|
| + if (it->first != kWidevineKeySystem)
|
| + key_systems.push_back(it->first);
|
| + }
|
| + return key_systems;
|
| +}
|
| +
|
| base::LazyInstance<KeySystemUuidManager>::Leaky g_key_system_uuid_manager =
|
| LAZY_INSTANCE_INITIALIZER;
|
|
|
| @@ -264,13 +276,18 @@ bool MediaDrmBridge::IsSecurityLevelSupported(const std::string& key_system,
|
| return media_drm_bridge->SetSecurityLevel(security_level);
|
| }
|
|
|
| -//static
|
| +// static
|
| void MediaDrmBridge::AddKeySystemUuidMapping(const std::string& key_system,
|
| const std::vector<uint8>& uuid) {
|
| g_key_system_uuid_manager.Get().AddMapping(key_system, uuid);
|
| }
|
|
|
| // static
|
| +std::vector<std::string> MediaDrmBridge::GetPlatformKeySystemNames() {
|
| + return g_key_system_uuid_manager.Get().GetPlatformKeySystemNames();
|
| +}
|
| +
|
| +// static
|
| bool MediaDrmBridge::IsKeySystemSupported(const std::string& key_system) {
|
| DCHECK(!key_system.empty());
|
| return IsKeySystemSupportedWithTypeImpl(key_system, "");
|
|
|