OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_WEBCONTENTDECRYPTIONMODULEACCESS_IMPL_H_ | 5 #ifndef MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULEACCESS_IMPL_H_ |
6 #define MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULEACCESS_IMPL_H_ | 6 #define MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULEACCESS_IMPL_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "media/base/cdm_config.h" | |
10 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleAccess.h" | 9 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleAccess.h" |
11 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" | 10 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" |
12 #include "third_party/WebKit/public/platform/WebMediaKeySystemConfiguration.h" | 11 #include "third_party/WebKit/public/platform/WebMediaKeySystemConfiguration.h" |
13 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" | 12 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" |
14 #include "third_party/WebKit/public/platform/WebString.h" | 13 #include "third_party/WebKit/public/platform/WebString.h" |
15 | 14 |
16 namespace media { | 15 namespace media { |
17 | 16 |
18 class WebEncryptedMediaClientImpl; | 17 class WebEncryptedMediaClientImpl; |
19 | 18 |
20 class WebContentDecryptionModuleAccessImpl | 19 class WebContentDecryptionModuleAccessImpl |
21 : public blink::WebContentDecryptionModuleAccess { | 20 : public blink::WebContentDecryptionModuleAccess { |
22 public: | 21 public: |
23 static WebContentDecryptionModuleAccessImpl* Create( | 22 static WebContentDecryptionModuleAccessImpl* Create( |
24 const blink::WebString& key_system, | 23 const blink::WebString& key_system, |
| 24 const blink::WebMediaKeySystemConfiguration& configuration, |
25 const blink::WebSecurityOrigin& security_origin, | 25 const blink::WebSecurityOrigin& security_origin, |
26 const blink::WebMediaKeySystemConfiguration& configuration, | |
27 const CdmConfig& cdm_config, | |
28 const base::WeakPtr<WebEncryptedMediaClientImpl>& client); | 26 const base::WeakPtr<WebEncryptedMediaClientImpl>& client); |
29 virtual ~WebContentDecryptionModuleAccessImpl(); | 27 virtual ~WebContentDecryptionModuleAccessImpl(); |
30 | 28 |
31 // blink::WebContentDecryptionModuleAccess interface. | 29 // blink::WebContentDecryptionModuleAccess interface. |
32 virtual blink::WebMediaKeySystemConfiguration getConfiguration(); | 30 virtual blink::WebMediaKeySystemConfiguration getConfiguration(); |
33 virtual void createContentDecryptionModule( | 31 virtual void createContentDecryptionModule( |
34 blink::WebContentDecryptionModuleResult result); | 32 blink::WebContentDecryptionModuleResult result); |
35 | 33 |
36 private: | 34 private: |
37 WebContentDecryptionModuleAccessImpl( | 35 WebContentDecryptionModuleAccessImpl( |
38 const blink::WebString& key_system, | 36 const blink::WebString& key_system, |
| 37 const blink::WebMediaKeySystemConfiguration& configuration, |
39 const blink::WebSecurityOrigin& security_origin, | 38 const blink::WebSecurityOrigin& security_origin, |
40 const blink::WebMediaKeySystemConfiguration& configuration, | |
41 const CdmConfig& cdm_config, | |
42 const base::WeakPtr<WebEncryptedMediaClientImpl>& client); | 39 const base::WeakPtr<WebEncryptedMediaClientImpl>& client); |
43 | 40 |
44 const blink::WebString key_system_; | 41 blink::WebString key_system_; |
45 const blink::WebSecurityOrigin security_origin_; | 42 blink::WebMediaKeySystemConfiguration configuration_; |
46 const blink::WebMediaKeySystemConfiguration configuration_; | 43 blink::WebSecurityOrigin security_origin_; |
47 const CdmConfig cdm_config_; | |
48 | 44 |
49 // Keep a WeakPtr as client is owned by render_frame_impl. | 45 // Keep a WeakPtr as client is owned by render_frame_impl. |
50 base::WeakPtr<WebEncryptedMediaClientImpl> client_; | 46 base::WeakPtr<WebEncryptedMediaClientImpl> client_; |
51 | 47 |
52 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleAccessImpl); | 48 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleAccessImpl); |
53 }; | 49 }; |
54 | 50 |
55 } // namespace media | 51 } // namespace media |
56 | 52 |
57 #endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULEACCESS_IMPL_H_ | 53 #endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULEACCESS_IMPL_H_ |
OLD | NEW |