OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "media/base/android/media_client_android.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 #include "base/stl_util.h" |
| 9 |
| 10 namespace media { |
| 11 |
| 12 static MediaClientAndroid* g_media_client = nullptr; |
| 13 |
| 14 void SetMediaClientAndroid(MediaClientAndroid* media_client) { |
| 15 DCHECK(!g_media_client); |
| 16 g_media_client = media_client; |
| 17 } |
| 18 |
| 19 MediaClientAndroid* GetMediaClientAndroid() { |
| 20 return g_media_client; |
| 21 } |
| 22 |
| 23 MediaClientAndroid::MediaClientAndroid() { |
| 24 } |
| 25 |
| 26 MediaClientAndroid::~MediaClientAndroid() { |
| 27 } |
| 28 |
| 29 const base::hash_map<std::string, UUID>& |
| 30 MediaClientAndroid::GetKeySystemUUIDMappings() const { |
| 31 return key_system_uuid_map_; |
| 32 } |
| 33 |
| 34 media::MediaDrmBridgeDelegate* MediaClientAndroid::GetMediaDrmBridgeDelegate( |
| 35 const std::vector<uint8_t>& scheme_uuid) { |
| 36 return nullptr; |
| 37 } |
| 38 |
| 39 void MediaClientAndroid::AddKeySystemUUIDMapping( |
| 40 const std::string& key_system, const UUID& scheme_uuid) { |
| 41 DCHECK(!ContainsKey(key_system_uuid_map_, key_system)) |
| 42 << "Shouldn't overwrite an existing key system."; |
| 43 key_system_uuid_map_[key_system] = scheme_uuid; |
| 44 } |
| 45 |
| 46 } // namespace media |
OLD | NEW |