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" |
10 | 11 |
11 namespace media { | 12 namespace media { |
12 | 13 |
13 class DefaultCdmFactory : public CdmFactory { | 14 class MojoCdmFactory : public CdmFactory { |
14 public: | 15 public: |
15 DefaultCdmFactory(); | 16 explicit MojoCdmFactory( |
16 ~DefaultCdmFactory() final; | 17 mojo::ContentDecryptionModuleFactoryPtr remote_factory); |
| 18 ~MojoCdmFactory() final; |
17 | 19 |
18 // CdmFactory implementation. | 20 // CdmFactory implementation. |
19 scoped_ptr<MediaKeys> Create( | 21 scoped_ptr<MediaKeys> Create( |
20 const std::string& key_system, | 22 const std::string& key_system, |
21 bool allow_distinctive_identifier, | 23 bool allow_distinctive_identifier, |
22 bool allow_persistent_state, | 24 bool allow_persistent_state, |
23 const GURL& security_origin, | 25 const GURL& security_origin, |
24 const SessionMessageCB& session_message_cb, | 26 const SessionMessageCB& session_message_cb, |
25 const SessionClosedCB& session_closed_cb, | 27 const SessionClosedCB& session_closed_cb, |
26 const SessionErrorCB& session_error_cb, | 28 const SessionErrorCB& session_error_cb, |
27 const SessionKeysChangeCB& session_keys_change_cb, | 29 const SessionKeysChangeCB& session_keys_change_cb, |
28 const SessionExpirationUpdateCB& session_expiration_update_cb) final; | 30 const SessionExpirationUpdateCB& session_expiration_update_cb) final; |
29 | 31 |
30 private: | 32 private: |
31 DISALLOW_COPY_AND_ASSIGN(DefaultCdmFactory); | 33 // The next CDM ID for the current process. |
| 34 static int next_cdm_id_; |
| 35 |
| 36 mojo::ContentDecryptionModuleFactoryPtr remote_factory_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(MojoCdmFactory); |
32 }; | 39 }; |
33 | 40 |
34 } // namespace media | 41 } // namespace media |
35 | 42 |
36 #endif // MEDIA_CDM_DEFAULT_CDM_FACTORY_H_ | 43 #endif // MEDIA_MOJO_SERVICES_MOJO_CDM_FACTORY_H_ |
OLD | NEW |