Fix cast shell to work with upstream content_browser_client API change and header...
[chromium-blink-merge.git] / chromecast / shell / renderer / key_systems_cast.cc
bloba0818d9eb2e147f0ecb6ce444ad2732197bcd838
1 // Copyright 2014 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/shell/renderer/key_systems_cast.h"
7 #include <string>
9 #include "base/command_line.h"
10 #include "base/logging.h"
11 #include "chromecast/media/base/key_systems_common.h"
12 #include "components/cdm/renderer/widevine_key_systems.h"
13 #include "content/public/common/eme_constants.h"
15 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
17 namespace chromecast {
18 namespace shell {
20 void AddKeySystemWithCodecs(
21 const std::string& key_system_name,
22 std::vector<content::KeySystemInfo>* concrete_key_systems) {
23 content::KeySystemInfo info(key_system_name);
24 info.supported_codecs = content::EME_CODEC_MP4_ALL;
25 concrete_key_systems->push_back(info);
28 void AddChromecastKeySystems(
29 std::vector<content::KeySystemInfo>* key_systems_info) {
30 #if defined(WIDEVINE_CDM_AVAILABLE)
31 AddWidevineWithCodecs(cdm::WIDEVINE,
32 content::EME_CODEC_MP4_ALL,
33 key_systems_info);
34 #endif
36 #if defined(PLAYREADY_CDM_AVAILABLE)
37 AddKeySystemWithCodecs(media::kChromecastPlayreadyKeySystem,
38 key_systems_info);
39 #endif
42 } // namespace shell
43 } // namespace chromecast