OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_CDM_DEFAULT_CDM_FACTORY_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_CDM_FACTORY_H_ |
6 #define MEDIA_CDM_DEFAULT_CDM_FACTORY_H_ | 6 #define MEDIA_MOJO_SERVICES_MOJO_CDM_FACTORY_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "media/base/cdm_factory.h" | 9 #include "media/base/cdm_factory.h" |
10 #include "media/mojo/interfaces/content_decryption_module_factory.mojom.h" | |
11 #include "mojo/public/cpp/bindings/interface_impl.h" | |
10 | 12 |
11 namespace media { | 13 namespace media { |
12 | 14 |
13 class DefaultCdmFactory : public CdmFactory { | 15 class MojoCdmFactory : public CdmFactory { |
14 public: | 16 public: |
15 DefaultCdmFactory(); | 17 explicit MojoCdmFactory( |
16 ~DefaultCdmFactory() final; | 18 mojo::ContentDecryptionModuleFactoryPtr remote_factory); |
19 ~MojoCdmFactory() final; | |
17 | 20 |
18 // CdmFactory implementation. | 21 // CdmFactory implementation. |
19 scoped_ptr<MediaKeys> Create( | 22 scoped_ptr<MediaKeys> Create( |
20 const std::string& key_system, | 23 const std::string& key_system, |
21 const GURL& security_origin, | 24 const GURL& security_origin, |
22 const SessionMessageCB& session_message_cb, | 25 const SessionMessageCB& session_message_cb, |
23 const SessionClosedCB& session_closed_cb, | 26 const SessionClosedCB& session_closed_cb, |
24 const SessionErrorCB& session_error_cb, | 27 const SessionErrorCB& session_error_cb, |
25 const SessionKeysChangeCB& session_keys_change_cb, | 28 const SessionKeysChangeCB& session_keys_change_cb, |
26 const SessionExpirationUpdateCB& session_expiration_update_cb) final; | 29 const SessionExpirationUpdateCB& session_expiration_update_cb) final; |
27 | 30 |
28 private: | 31 private: |
29 DISALLOW_COPY_AND_ASSIGN(DefaultCdmFactory); | 32 // The next CDM ID for the current process. |
33 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
| |
34 | |
35 mojo::ContentDecryptionModuleFactoryPtr remote_factory_; | |
36 | |
37 DISALLOW_COPY_AND_ASSIGN(MojoCdmFactory); | |
30 }; | 38 }; |
31 | 39 |
32 } // namespace media | 40 } // namespace media |
33 | 41 |
34 #endif // MEDIA_CDM_DEFAULT_CDM_FACTORY_H_ | 42 #endif // MEDIA_MOJO_SERVICES_MOJO_CDM_FACTORY_H_ |
OLD | NEW |