blob: 8a2ba58a71f4875d116ba6fb7c57356783c7b839 [file] [log] [blame]
jrummellc82f868e2016-04-22 06:14:461// 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 Wennborg0917de892020-04-28 20:21:157#include "base/check.h"
Xiaohan Wang328218572017-10-02 19:20:418
jrummellc82f868e2016-04-22 06:14:469namespace content {
10
Xiaohan Wangd577a0d2021-04-15 18:03:4311CdmInfo::CdmInfo(const std::string& key_system,
12 Robustness robustness,
John Rummellf1ece70a2021-04-28 19:02:5113 base::Optional<media::CdmCapability> capability,
Xiaohan Wangd577a0d2021-04-15 18:03:4314 bool supports_sub_key_systems,
15 const std::string& name,
Ken Rockot315def72018-11-10 02:16:1016 const base::Token& guid,
Xiaohan Wangb78a48b2018-06-22 18:51:5017 const base::Version& version,
18 const base::FilePath& path,
Xiaohan Wangd577a0d2021-04-15 18:03:4319 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 Wang328218572017-10-02 19:20:4125 guid(guid),
jrummellc82f868e2016-04-22 06:14:4626 version(version),
27 path(path),
Xiaohan Wangd577a0d2021-04-15 18:03:4328 file_system_id(file_system_id) {
Xiaohan Wang31c6ddb2021-04-20 00:42:3729 DCHECK(!capability || !capability->encryption_schemes.empty());
Xiaohan Wangd577a0d2021-04-15 18:03:4330}
31
32CdmInfo::CdmInfo(const std::string& key_system,
33 Robustness robustness,
John Rummellf1ece70a2021-04-28 19:02:5134 base::Optional<media::CdmCapability> capability)
Xiaohan Wangd577a0d2021-04-15 18:03:4335 : key_system(key_system),
36 robustness(robustness),
37 capability(std::move(capability)) {
Xiaohan Wang31c6ddb2021-04-20 00:42:3738 DCHECK(!capability || !capability->encryption_schemes.empty());
Xiaohan Wang328218572017-10-02 19:20:4139}
jrummellc82f868e2016-04-22 06:14:4640
41CdmInfo::CdmInfo(const CdmInfo& other) = default;
42
John Rummell594228842018-05-01 19:48:0243CdmInfo::~CdmInfo() = default;
jrummellc82f868e2016-04-22 06:14:4644
jrummellc82f868e2016-04-22 06:14:4645} // namespace content