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_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_ | 5 #ifndef MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_ |
6 #define MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_ | 6 #define MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <unordered_map> | 10 #include <unordered_map> |
(...skipping 20 matching lines...) Expand all Loading... |
31 class MediaLog; | 31 class MediaLog; |
32 class MediaPermission; | 32 class MediaPermission; |
33 | 33 |
34 class MEDIA_BLINK_EXPORT WebEncryptedMediaClientImpl | 34 class MEDIA_BLINK_EXPORT WebEncryptedMediaClientImpl |
35 : public blink::WebEncryptedMediaClient { | 35 : public blink::WebEncryptedMediaClient { |
36 public: | 36 public: |
37 WebEncryptedMediaClientImpl( | 37 WebEncryptedMediaClientImpl( |
38 base::Callback<bool(void)> are_secure_codecs_supported_cb, | 38 base::Callback<bool(void)> are_secure_codecs_supported_cb, |
39 CdmFactory* cdm_factory, | 39 CdmFactory* cdm_factory, |
40 MediaPermission* media_permission, | 40 MediaPermission* media_permission, |
41 const scoped_refptr<MediaLog>& media_log); | 41 MediaLog* media_log); |
42 ~WebEncryptedMediaClientImpl() override; | 42 ~WebEncryptedMediaClientImpl() override; |
43 | 43 |
44 // WebEncryptedMediaClient implementation. | 44 // WebEncryptedMediaClient implementation. |
45 void RequestMediaKeySystemAccess( | 45 void RequestMediaKeySystemAccess( |
46 blink::WebEncryptedMediaRequest request) override; | 46 blink::WebEncryptedMediaRequest request) override; |
47 | 47 |
48 // Create the CDM for |key_system| and |security_origin|. The caller owns | 48 // Create the CDM for |key_system| and |security_origin|. The caller owns |
49 // the created cdm (passed back using |result|). | 49 // the created cdm (passed back using |result|). |
50 void CreateCdm( | 50 void CreateCdm( |
51 const blink::WebString& key_system, | 51 const blink::WebString& key_system, |
(...skipping 22 matching lines...) Expand all Loading... |
74 // Gets the Reporter for |key_system|. If it doesn't already exist, | 74 // Gets the Reporter for |key_system|. If it doesn't already exist, |
75 // create one. | 75 // create one. |
76 Reporter* GetReporter(const blink::WebString& key_system); | 76 Reporter* GetReporter(const blink::WebString& key_system); |
77 | 77 |
78 // Reporter singletons. | 78 // Reporter singletons. |
79 std::unordered_map<std::string, std::unique_ptr<Reporter>> reporters_; | 79 std::unordered_map<std::string, std::unique_ptr<Reporter>> reporters_; |
80 | 80 |
81 base::Callback<bool(void)> are_secure_codecs_supported_cb_; | 81 base::Callback<bool(void)> are_secure_codecs_supported_cb_; |
82 CdmFactory* cdm_factory_; | 82 CdmFactory* cdm_factory_; |
83 KeySystemConfigSelector key_system_config_selector_; | 83 KeySystemConfigSelector key_system_config_selector_; |
84 scoped_refptr<MediaLog> media_log_; | 84 MediaLog* media_log_; |
85 base::WeakPtrFactory<WebEncryptedMediaClientImpl> weak_factory_; | 85 base::WeakPtrFactory<WebEncryptedMediaClientImpl> weak_factory_; |
86 }; | 86 }; |
87 | 87 |
88 } // namespace media | 88 } // namespace media |
89 | 89 |
90 #endif // MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_ | 90 #endif // MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_ |
OLD | NEW |