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_BASE_ANDROID_ANDROID_CDM_FACTORY_H_ | 5 #ifndef MEDIA_BASE_ANDROID_ANDROID_CDM_FACTORY_H_ |
6 #define MEDIA_BASE_ANDROID_ANDROID_CDM_FACTORY_H_ | 6 #define MEDIA_BASE_ANDROID_ANDROID_CDM_FACTORY_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "media/base/android/provision_fetcher.h" | 10 #include "media/base/android/provision_fetcher.h" |
11 #include "media/base/cdm_factory.h" | 11 #include "media/base/cdm_factory.h" |
12 #include "media/base/media_export.h" | 12 #include "media/base/media_export.h" |
13 | 13 |
14 namespace media { | 14 namespace media { |
15 | 15 |
| 16 class MediaPermission; |
16 struct CdmConfig; | 17 struct CdmConfig; |
17 | 18 |
18 class MEDIA_EXPORT AndroidCdmFactory : public CdmFactory { | 19 class MEDIA_EXPORT AndroidCdmFactory : public CdmFactory { |
19 public: | 20 public: |
20 AndroidCdmFactory(const CreateFetcherCB& create_fetcher_cb); | 21 AndroidCdmFactory(MediaPermission* media_permission, |
| 22 const CreateFetcherCB& create_fetcher_cb); |
21 ~AndroidCdmFactory() final; | 23 ~AndroidCdmFactory() final; |
22 | 24 |
23 // CdmFactory implementation. | 25 // CdmFactory implementation. |
24 void Create(const std::string& key_system, | 26 void Create(const std::string& key_system, |
25 const GURL& security_origin, | 27 const GURL& security_origin, |
26 const CdmConfig& cdm_config, | 28 const CdmConfig& cdm_config, |
27 const SessionMessageCB& session_message_cb, | 29 const SessionMessageCB& session_message_cb, |
28 const SessionClosedCB& session_closed_cb, | 30 const SessionClosedCB& session_closed_cb, |
29 const LegacySessionErrorCB& legacy_session_error_cb, | 31 const LegacySessionErrorCB& legacy_session_error_cb, |
30 const SessionKeysChangeCB& session_keys_change_cb, | 32 const SessionKeysChangeCB& session_keys_change_cb, |
31 const SessionExpirationUpdateCB& session_expiration_update_cb, | 33 const SessionExpirationUpdateCB& session_expiration_update_cb, |
32 const CdmCreatedCB& cdm_created_cb) final; | 34 const CdmCreatedCB& cdm_created_cb) final; |
33 | 35 |
34 private: | 36 private: |
| 37 MediaPermission* media_permission_; |
35 CreateFetcherCB create_fetcher_cb_; | 38 CreateFetcherCB create_fetcher_cb_; |
36 | 39 |
37 DISALLOW_COPY_AND_ASSIGN(AndroidCdmFactory); | 40 DISALLOW_COPY_AND_ASSIGN(AndroidCdmFactory); |
38 }; | 41 }; |
39 | 42 |
40 } // namespace media | 43 } // namespace media |
41 | 44 |
42 #endif // MEDIA_BASE_ANDROID_ANDROID_CDM_FACTORY_H_ | 45 #endif // MEDIA_BASE_ANDROID_ANDROID_CDM_FACTORY_H_ |
OLD | NEW |