Chromium Code Reviews| 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 | |
|
no sievers
2016/04/18 21:24:21
Can you also put a small comment, at least saying
jrummell
2016/04/19 23:20:39
Done.
| |
| 16 class CONTENT_EXPORT CdmService { | |
| 17 public: | |
| 18 // Returns the CdmService singleton. | |
| 19 static CdmService* GetInstance(); | |
| 20 | |
| 21 virtual ~CdmService() {} | |
| 22 | |
| 23 // Must be called on the instance to finish initialization. | |
| 24 virtual void Init() = 0; | |
| 25 | |
| 26 // Registers a CDM with the specified CDM information. The CDM will be | |
| 27 // inserted at the head of the list so that it can override any older | |
| 28 // registrations. | |
| 29 // Note: Since only 1 version of the CDM can be loaded at any given time, | |
| 30 // it is possible that there will be a mismatch between the functionality | |
| 31 // reported and what is actually available, if the reported functionality | |
| 32 // changes between versions. (http://crbug.com/599588) | |
| 33 virtual void RegisterCdm(const CdmInfo& info) = 0; | |
| 34 | |
|
no sievers
2016/04/18 21:24:21
Hmm it's a bit confusing that there are two APIs t
jrummell
2016/04/19 23:20:39
Widevine (the only CDM supported with Chrome) is u
no sievers
2016/04/20 00:03:35
But I'm wondering why you need two public APIs. It
| |
| 35 // Returns the list of all registered CDMs and the associated data. | |
| 36 virtual const std::vector<CdmInfo>& GetAllRegisteredCdms() const = 0; | |
|
no sievers
2016/04/18 21:24:21
Make this method non-const, see reasoning here: ht
jrummell
2016/04/19 23:20:39
Done.
| |
| 37 }; | |
| 38 | |
| 39 } // namespace content | |
| 40 | |
| 41 #endif // CONTENT_PUBLIC_BROWSER_CDM_SERVICE_H_ | |
| OLD | NEW |