Chromium Code Reviews| Index: content/browser/media/cdm_service_impl.h |
| diff --git a/content/browser/media/cdm_service_impl.h b/content/browser/media/cdm_service_impl.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0d47c028934bb8ffbd43e06fe05bd135c810ccd4 |
| --- /dev/null |
| +++ b/content/browser/media/cdm_service_impl.h |
| @@ -0,0 +1,43 @@ |
| +// 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_BROWSER_MEDIA_CDM_SERVICE_IMPL_H_ |
| +#define CONTENT_BROWSER_MEDIA_CDM_SERVICE_IMPL_H_ |
| + |
| +#include <string> |
| +#include <vector> |
| + |
| +#include "base/lazy_instance.h" |
| +#include "base/macros.h" |
| +#include "content/common/content_export.h" |
| +#include "content/public/browser/cdm_service.h" |
| +#include "content/public/common/cdm_info.h" |
| + |
| +namespace content { |
| + |
| +class CONTENT_EXPORT CdmServiceImpl : NON_EXPORTED_BASE(public CdmService) { |
| + public: |
| + // Returns the CdmServiceImpl singleton. |
| + static CdmServiceImpl* GetInstance(); |
| + |
| + // CdmService implementation. |
| + void Init() override; |
| + void RegisterCdm(const CdmInfo& info) override; |
|
Sorin Jianu
2016/04/15 01:53:26
Can we just forward declare CdmInfo instead of inc
jrummell
2016/04/18 20:39:47
Done.
|
| + const std::vector<CdmInfo>& GetAllRegisteredCdms() override; |
|
Sorin Jianu
2016/04/15 01:53:26
const?
jrummell
2016/04/18 20:39:47
Done.
|
| + |
| + private: |
| + friend struct base::DefaultLazyInstanceTraits<CdmServiceImpl>; |
| + friend class CdmServiceImplTest; |
| + |
| + CdmServiceImpl(); |
| + ~CdmServiceImpl() override; |
| + |
| + std::vector<CdmInfo> cdms_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(CdmServiceImpl); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_MEDIA_CDM_SERVICE_IMPL_H_ |