Index: media/mojo/services/mojo_cdm_factory_service.h |
diff --git a/media/mojo/services/mojo_cdm_factory_service.h b/media/mojo/services/mojo_cdm_factory_service.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3dd0058660c246e2d13d10f2d425235bd5bd851d |
--- /dev/null |
+++ b/media/mojo/services/mojo_cdm_factory_service.h |
@@ -0,0 +1,41 @@ |
+// Copyright 2014 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 MEDIA_MOJO_SERVICES_MOJO_CDM_FACTORY_SERVICE_H_ |
+#define MEDIA_MOJO_SERVICES_MOJO_CDM_FACTORY_SERVICE_H_ |
+ |
+#include "base/macros.h" |
+#include "media/base/media_export.h" |
+#include "media/mojo/interfaces/content_decryption_module_factory.mojom.h" |
+ |
+namespace media { |
+ |
+class MojoCdmServiceContext; |
+ |
+class MEDIA_EXPORT MojoCdmFactoryService |
+ : public mojo::ContentDecryptionModuleFactory { |
+ public: |
+ MojoCdmFactoryService( |
+ MojoCdmServiceContext* context, |
+ mojo::InterfaceRequest<mojo::ContentDecryptionModuleFactory> request); |
+ ~MojoCdmFactoryService() final; |
+ |
+ // mojo::InterfaceImpl<mojo::ContentDecryptionModuleFactory> implementation. |
+ void Create( |
+ const mojo::String& key_system, |
+ const mojo::String& security_origin, |
+ int32_t cdm_id, |
+ mojo::InterfaceRequest<mojo::ContentDecryptionModule> request) final; |
+ |
+ private: |
+ mojo::Binding<mojo::ContentDecryptionModuleFactory> binding_; |
+ |
+ MojoCdmServiceContext* context_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(MojoCdmFactoryService); |
+}; |
+ |
+} // namespace media |
+ |
+#endif // MEDIA_MOJO_SERVICES_MOJO_CDM_FACTORY_SERVICE_H_ |