jrummell | c82f868e | 2016-04-22 06:14:46 | [diff] [blame] | 1 | // Copyright 2016 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 "content/public/common/cdm_info.h" |
| 6 | |
Hans Wennborg | 0917de89 | 2020-04-28 20:21:15 | [diff] [blame] | 7 | #include "base/check.h" |
Xiaohan Wang | 32821857 | 2017-10-02 19:20:41 | [diff] [blame] | 8 | |
jrummell | c82f868e | 2016-04-22 06:14:46 | [diff] [blame] | 9 | namespace content { |
| 10 | |
Xiaohan Wang | d577a0d | 2021-04-15 18:03:43 | [diff] [blame] | 11 | CdmInfo::CdmInfo(const std::string& key_system, |
| 12 | Robustness robustness, |
John Rummell | f1ece70a | 2021-04-28 19:02:51 | [diff] [blame] | 13 | base::Optional<media::CdmCapability> capability, |
Xiaohan Wang | d577a0d | 2021-04-15 18:03:43 | [diff] [blame] | 14 | bool supports_sub_key_systems, |
| 15 | const std::string& name, |
Ken Rockot | 315def7 | 2018-11-10 02:16:10 | [diff] [blame] | 16 | const base::Token& guid, |
Xiaohan Wang | b78a48b | 2018-06-22 18:51:50 | [diff] [blame] | 17 | const base::Version& version, |
| 18 | const base::FilePath& path, |
Xiaohan Wang | d577a0d | 2021-04-15 18:03:43 | [diff] [blame] | 19 | const std::string& file_system_id) |
| 20 | : key_system(key_system), |
| 21 | robustness(robustness), |
| 22 | capability(std::move(capability)), |
| 23 | supports_sub_key_systems(supports_sub_key_systems), |
| 24 | name(name), |
Xiaohan Wang | 32821857 | 2017-10-02 19:20:41 | [diff] [blame] | 25 | guid(guid), |
jrummell | c82f868e | 2016-04-22 06:14:46 | [diff] [blame] | 26 | version(version), |
| 27 | path(path), |
Xiaohan Wang | d577a0d | 2021-04-15 18:03:43 | [diff] [blame] | 28 | file_system_id(file_system_id) { |
Xiaohan Wang | 31c6ddb | 2021-04-20 00:42:37 | [diff] [blame] | 29 | DCHECK(!capability || !capability->encryption_schemes.empty()); |
Xiaohan Wang | d577a0d | 2021-04-15 18:03:43 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | CdmInfo::CdmInfo(const std::string& key_system, |
| 33 | Robustness robustness, |
John Rummell | f1ece70a | 2021-04-28 19:02:51 | [diff] [blame] | 34 | base::Optional<media::CdmCapability> capability) |
Xiaohan Wang | d577a0d | 2021-04-15 18:03:43 | [diff] [blame] | 35 | : key_system(key_system), |
| 36 | robustness(robustness), |
| 37 | capability(std::move(capability)) { |
Xiaohan Wang | 31c6ddb | 2021-04-20 00:42:37 | [diff] [blame] | 38 | DCHECK(!capability || !capability->encryption_schemes.empty()); |
Xiaohan Wang | 32821857 | 2017-10-02 19:20:41 | [diff] [blame] | 39 | } |
jrummell | c82f868e | 2016-04-22 06:14:46 | [diff] [blame] | 40 | |
| 41 | CdmInfo::CdmInfo(const CdmInfo& other) = default; |
| 42 | |
John Rummell | 59422884 | 2018-05-01 19:48:02 | [diff] [blame] | 43 | CdmInfo::~CdmInfo() = default; |
jrummell | c82f868e | 2016-04-22 06:14:46 | [diff] [blame] | 44 | |
jrummell | c82f868e | 2016-04-22 06:14:46 | [diff] [blame] | 45 | } // namespace content |