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

Side by Side Diff: chromecast/browser/media/cast_media_client_android.cc

Issue 962793005: Adds MediaClientAndroid to support embedder/MediaDrmBridge interaction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename createSession to createSessionFromNative to avoid bug in FindBugs Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « chromecast/browser/media/cast_media_client_android.h ('k') | chromecast/chromecast.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 "chromecast/browser/media/cast_media_client_android.h"
6
7 #include "chromecast/media/base/key_systems_common.h"
8
9 namespace chromecast {
10 namespace media {
11
12 CastMediaClientAndroid::CastMediaClientAndroid() {
13 }
14
15 CastMediaClientAndroid::~CastMediaClientAndroid() {
16 }
17
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
23
24 auto platform_mappings = GetPlatformKeySystemUUIDMappings();
25 for (const auto& mapping : platform_mappings)
26 map->insert(mapping);
27 }
28
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
36
37 if (scheme_uuid == widevine_delegate_.GetUUID())
38 return &widevine_delegate_;
39
40 return nullptr;
41 }
42
43 } // namespace media
44 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/media/cast_media_client_android.h ('k') | chromecast/chromecast.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698