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

Unified Diff: media/mojo/services/mojo_cdm_factory.h

Issue 840473002: media: Support creation and SetCdm() for mojo based CDM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months 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: media/mojo/services/mojo_cdm_factory.h
diff --git a/media/cdm/default_cdm_factory.h b/media/mojo/services/mojo_cdm_factory.h
similarity index 53%
copy from media/cdm/default_cdm_factory.h
copy to media/mojo/services/mojo_cdm_factory.h
index 18db3a3f50e8d750281b51dec828fc9b8bebc5f3..c96c6cdd804c609fb17985e247bf5df3481cd7d6 100644
--- a/media/cdm/default_cdm_factory.h
+++ b/media/mojo/services/mojo_cdm_factory.h
@@ -2,18 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef MEDIA_CDM_DEFAULT_CDM_FACTORY_H_
-#define MEDIA_CDM_DEFAULT_CDM_FACTORY_H_
+#ifndef MEDIA_MOJO_SERVICES_MOJO_CDM_FACTORY_H_
+#define MEDIA_MOJO_SERVICES_MOJO_CDM_FACTORY_H_
#include "base/macros.h"
#include "media/base/cdm_factory.h"
+#include "media/mojo/interfaces/content_decryption_module_factory.mojom.h"
+#include "mojo/public/cpp/bindings/interface_impl.h"
namespace media {
-class DefaultCdmFactory : public CdmFactory {
+class MojoCdmFactory : public CdmFactory {
public:
- DefaultCdmFactory();
- ~DefaultCdmFactory() final;
+ explicit MojoCdmFactory(
+ mojo::ContentDecryptionModuleFactoryPtr remote_factory);
+ ~MojoCdmFactory() final;
// CdmFactory implementation.
scoped_ptr<MediaKeys> Create(
@@ -26,9 +29,14 @@ class DefaultCdmFactory : public CdmFactory {
const SessionExpirationUpdateCB& session_expiration_update_cb) final;
private:
- DISALLOW_COPY_AND_ASSIGN(DefaultCdmFactory);
+ // The next CDM ID for the current process.
+ static int next_cdm_id_;
ddorwin 2015/01/06 00:57:28 See comment in .mojom. This will not work when Mo
xhwang 2015/01/06 19:54:54 The plan for supporting a dedicated CDM/media proc
ddorwin 2015/01/07 00:37:13 I think what you mean is that there will also be a
+
+ mojo::ContentDecryptionModuleFactoryPtr remote_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(MojoCdmFactory);
};
} // namespace media
-#endif // MEDIA_CDM_DEFAULT_CDM_FACTORY_H_
+#endif // MEDIA_MOJO_SERVICES_MOJO_CDM_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698