| OLD | NEW |
| (Empty) |
| 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 #ifndef CONTENT_PUBLIC_BROWSER_CDM_SERVICE_H_ | |
| 6 #define CONTENT_PUBLIC_BROWSER_CDM_SERVICE_H_ | |
| 7 | |
| 8 #include <vector> | |
| 9 | |
| 10 #include "content/common/content_export.h" | |
| 11 | |
| 12 namespace content { | |
| 13 | |
| 14 struct CdmInfo; | |
| 15 | |
| 16 // Keeps track of the Content Decryption Modules that are available. | |
| 17 class CONTENT_EXPORT CdmService { | |
| 18 public: | |
| 19 // Returns the CdmService singleton. | |
| 20 static CdmService* GetInstance(); | |
| 21 | |
| 22 virtual ~CdmService() {} | |
| 23 | |
| 24 // Must be called on the instance to finish initialization. | |
| 25 virtual void Init() = 0; | |
| 26 | |
| 27 // Registers a CDM with the specified CDM information. The CDM will be | |
| 28 // inserted at the head of the list so that it can override any older | |
| 29 // registrations. | |
| 30 // Note: Since only 1 version of the CDM can be loaded at any given time, | |
| 31 // it is possible that there will be a mismatch between the functionality | |
| 32 // reported and what is actually available, if the reported functionality | |
| 33 // changes between versions. (http://crbug.com/599588) | |
| 34 virtual void RegisterCdm(const CdmInfo& info) = 0; | |
| 35 | |
| 36 // Returns the list of all registered CDMs and the associated data. | |
| 37 virtual const std::vector<CdmInfo>& GetAllRegisteredCdms() = 0; | |
| 38 }; | |
| 39 | |
| 40 } // namespace content | |
| 41 | |
| 42 #endif // CONTENT_PUBLIC_BROWSER_CDM_SERVICE_H_ | |
| OLD | NEW |