Extension syncing: Introduce a NeedsSync pref
[chromium-blink-merge.git] / chromecast / browser / media / cast_media_client_android.cc
blob696471e6c0dd368651c9a2f39031af01b42469e7
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.
5 #include "chromecast/browser/media/cast_media_client_android.h"
7 #include "chromecast/media/base/key_systems_common.h"
9 namespace chromecast {
10 namespace media {
12 CastMediaClientAndroid::CastMediaClientAndroid() {
15 CastMediaClientAndroid::~CastMediaClientAndroid() {
18 void CastMediaClientAndroid::AddKeySystemUUIDMappings(KeySystemUuidMap* map) {
19 // Note: MediaDrmBridge adds the Widevine UUID mapping automatically.
20 #if defined(PLAYREADY_CDM_AVAILABLE)
21 (*map)[kChromecastPlayreadyKeySystem] = playready_delegate_.GetUUID();
22 #endif
24 auto platform_mappings = GetPlatformKeySystemUUIDMappings();
25 for (const auto& mapping : platform_mappings)
26 map->insert(mapping);
29 ::media::MediaDrmBridgeDelegate*
30 CastMediaClientAndroid::GetMediaDrmBridgeDelegate(
31 const ::media::UUID& scheme_uuid) {
32 #if defined(PLAYREADY_CDM_AVAILABLE)
33 if (scheme_uuid == playready_delegate_.GetUUID())
34 return &playready_delegate_;
35 #endif
37 if (scheme_uuid == widevine_delegate_.GetUUID())
38 return &widevine_delegate_;
40 return nullptr;
43 } // namespace media
44 } // namespace chromecast