OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/media/cdm_registry_impl.h" | 5 #include "content/browser/media/cdm_registry_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "content/public/common/cdm_info.h" | 9 #include "content/public/common/cdm_info.h" |
10 #include "content/public/common/content_client.h" | 10 #include "content/public/common/content_client.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 CdmRegistryImpl* CdmRegistryImpl::GetInstance() { | 23 CdmRegistryImpl* CdmRegistryImpl::GetInstance() { |
24 return g_cdm_registry.Pointer(); | 24 return g_cdm_registry.Pointer(); |
25 } | 25 } |
26 | 26 |
27 CdmRegistryImpl::CdmRegistryImpl() {} | 27 CdmRegistryImpl::CdmRegistryImpl() {} |
28 | 28 |
29 CdmRegistryImpl::~CdmRegistryImpl() {} | 29 CdmRegistryImpl::~CdmRegistryImpl() {} |
30 | 30 |
31 void CdmRegistryImpl::Init() { | 31 void CdmRegistryImpl::Init() { |
32 // Let embedders register CDMs. | 32 // Let embedders register CDMs. |
33 GetContentClient()->AddContentDecryptionModules(&cdms_); | 33 GetContentClient()->AddContentDecryptionModules(&cdms_, nullptr); |
34 } | 34 } |
35 | 35 |
36 void CdmRegistryImpl::RegisterCdm(const CdmInfo& info) { | 36 void CdmRegistryImpl::RegisterCdm(const CdmInfo& info) { |
37 // Always register new CDMs at the beginning of the list, so that | 37 // Always register new CDMs at the beginning of the list, so that |
38 // subsequent requests get the latest. | 38 // subsequent requests get the latest. |
39 cdms_.insert(cdms_.begin(), info); | 39 cdms_.insert(cdms_.begin(), info); |
40 } | 40 } |
41 | 41 |
42 const std::vector<CdmInfo>& CdmRegistryImpl::GetAllRegisteredCdms() { | 42 const std::vector<CdmInfo>& CdmRegistryImpl::GetAllRegisteredCdms() { |
43 return cdms_; | 43 return cdms_; |
44 } | 44 } |
45 | 45 |
46 } // namespace media | 46 } // namespace media |
OLD | NEW |