OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_MOJO_SERVICES_MOJO_CDM_FACTORY_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_CDM_FACTORY_H_ |
6 #define MEDIA_MOJO_SERVICES_MOJO_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 | 10 |
11 namespace mojo { | |
12 namespace shell { | 11 namespace shell { |
13 namespace mojom { | 12 namespace mojom { |
14 class InterfaceProvider; | 13 class InterfaceProvider; |
15 } | 14 } |
16 } | 15 } |
17 } | |
18 | 16 |
19 namespace media { | 17 namespace media { |
20 | 18 |
21 class MojoCdmFactory : public CdmFactory { | 19 class MojoCdmFactory : public CdmFactory { |
22 public: | 20 public: |
23 explicit MojoCdmFactory( | 21 explicit MojoCdmFactory(shell::mojom::InterfaceProvider* interface_provider); |
24 mojo::shell::mojom::InterfaceProvider* interface_provider); | |
25 ~MojoCdmFactory() final; | 22 ~MojoCdmFactory() final; |
26 | 23 |
27 // CdmFactory implementation. | 24 // CdmFactory implementation. |
28 void Create(const std::string& key_system, | 25 void Create(const std::string& key_system, |
29 const GURL& security_origin, | 26 const GURL& security_origin, |
30 const CdmConfig& cdm_config, | 27 const CdmConfig& cdm_config, |
31 const SessionMessageCB& session_message_cb, | 28 const SessionMessageCB& session_message_cb, |
32 const SessionClosedCB& session_closed_cb, | 29 const SessionClosedCB& session_closed_cb, |
33 const LegacySessionErrorCB& legacy_session_error_cb, | 30 const LegacySessionErrorCB& legacy_session_error_cb, |
34 const SessionKeysChangeCB& session_keys_change_cb, | 31 const SessionKeysChangeCB& session_keys_change_cb, |
35 const SessionExpirationUpdateCB& session_expiration_update_cb, | 32 const SessionExpirationUpdateCB& session_expiration_update_cb, |
36 const CdmCreatedCB& cdm_created_cb) final; | 33 const CdmCreatedCB& cdm_created_cb) final; |
37 | 34 |
38 private: | 35 private: |
39 mojo::shell::mojom::InterfaceProvider* interface_provider_; | 36 shell::mojom::InterfaceProvider* interface_provider_; |
40 | 37 |
41 DISALLOW_COPY_AND_ASSIGN(MojoCdmFactory); | 38 DISALLOW_COPY_AND_ASSIGN(MojoCdmFactory); |
42 }; | 39 }; |
43 | 40 |
44 } // namespace media | 41 } // namespace media |
45 | 42 |
46 #endif // MEDIA_MOJO_SERVICES_MOJO_CDM_FACTORY_H_ | 43 #endif // MEDIA_MOJO_SERVICES_MOJO_CDM_FACTORY_H_ |
OLD | NEW |