Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1454)

Unified Diff: content/browser/media/cdm_registry_impl.h

Issue 2565853003: media: Rename CdmService to CdmRegistry (Closed)
Patch Set: add missing BUILD.gn entry Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/media/cdm_registry_impl.h
diff --git a/content/browser/media/cdm_registry_impl.h b/content/browser/media/cdm_registry_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..0313bfe3d41c59475ea22a71b32b4e721faf9a26
--- /dev/null
+++ b/content/browser/media/cdm_registry_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_REGISTRY_IMPL_H_
+#define CONTENT_BROWSER_MEDIA_CDM_REGISTRY_IMPL_H_
+
+#include <vector>
+
+#include "base/lazy_instance.h"
+#include "base/macros.h"
+#include "content/common/content_export.h"
+#include "content/public/browser/cdm_registry.h"
+
+namespace content {
+
+struct CdmInfo;
+
+class CONTENT_EXPORT CdmRegistryImpl : NON_EXPORTED_BASE(public CdmRegistry) {
+ public:
+ // Returns the CdmRegistryImpl singleton.
+ static CdmRegistryImpl* GetInstance();
+
+ // CdmRegistry implementation.
+ void Init() override;
+ void RegisterCdm(const CdmInfo& info) override;
+ const std::vector<CdmInfo>& GetAllRegisteredCdms() override;
+
+ private:
+ friend struct base::DefaultLazyInstanceTraits<CdmRegistryImpl>;
+ friend class CdmRegistryImplTest;
+
+ CdmRegistryImpl();
+ ~CdmRegistryImpl() override;
+
+ std::vector<CdmInfo> cdms_;
+
+ DISALLOW_COPY_AND_ASSIGN(CdmRegistryImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_MEDIA_CDM_REGISTRY_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698