Chromium Code Reviews| Index: content/public/browser/cdm_service.h |
| diff --git a/content/public/browser/cdm_service.h b/content/public/browser/cdm_service.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..501970ea54e0d35cf982f0d7a7bc857a571e3780 |
| --- /dev/null |
| +++ b/content/public/browser/cdm_service.h |
| @@ -0,0 +1,41 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_PUBLIC_BROWSER_CDM_SERVICE_H_ |
| +#define CONTENT_PUBLIC_BROWSER_CDM_SERVICE_H_ |
| + |
| +#include <vector> |
| + |
| +#include "content/common/content_export.h" |
| + |
| +namespace content { |
| + |
| +struct CdmInfo; |
| + |
|
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.
|
| +class CONTENT_EXPORT CdmService { |
| + public: |
| + // Returns the CdmService singleton. |
| + static CdmService* GetInstance(); |
| + |
| + virtual ~CdmService() {} |
| + |
| + // Must be called on the instance to finish initialization. |
| + virtual void Init() = 0; |
| + |
| + // Registers a CDM with the specified CDM information. The CDM will be |
| + // inserted at the head of the list so that it can override any older |
| + // registrations. |
| + // Note: Since only 1 version of the CDM can be loaded at any given time, |
| + // it is possible that there will be a mismatch between the functionality |
| + // reported and what is actually available, if the reported functionality |
| + // changes between versions. (http://crbug.com/599588) |
| + virtual void RegisterCdm(const CdmInfo& info) = 0; |
| + |
|
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
|
| + // Returns the list of all registered CDMs and the associated data. |
| + 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.
|
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_PUBLIC_BROWSER_CDM_SERVICE_H_ |