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_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ | 5 #ifndef MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ |
6 #define MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ | 6 #define MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
11 #include "media/base/media_export.h" | 11 #include "media/base/media_export.h" |
12 #include "third_party/WebKit/public/platform/WebContentDecryptionModule.h" | 12 #include "third_party/WebKit/public/platform/WebContentDecryptionModule.h" |
13 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" | 13 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 #if defined(ENABLE_PEPPER_CDMS) | 16 #if defined(ENABLE_PEPPER_CDMS) |
17 class WebLocalFrame; | 17 class WebLocalFrame; |
18 #endif | 18 #endif |
19 class WebSecurityOrigin; | 19 class WebSecurityOrigin; |
20 } | 20 } |
21 | 21 |
22 namespace media { | 22 namespace media { |
23 | 23 |
| 24 struct CdmConfig; |
24 class CdmContext; | 25 class CdmContext; |
25 class CdmFactory; | 26 class CdmFactory; |
26 class CdmSessionAdapter; | 27 class CdmSessionAdapter; |
27 class WebContentDecryptionModuleSessionImpl; | 28 class WebContentDecryptionModuleSessionImpl; |
28 | 29 |
29 class MEDIA_EXPORT WebContentDecryptionModuleImpl | 30 class MEDIA_EXPORT WebContentDecryptionModuleImpl |
30 : public blink::WebContentDecryptionModule { | 31 : public blink::WebContentDecryptionModule { |
31 public: | 32 public: |
32 static void Create(CdmFactory* cdm_factory, | 33 static void Create(CdmFactory* cdm_factory, |
33 const base::string16& key_system, | 34 const base::string16& key_system, |
34 bool allow_distinctive_identifier, | |
35 bool allow_persistent_state, | |
36 const blink::WebSecurityOrigin& security_origin, | 35 const blink::WebSecurityOrigin& security_origin, |
| 36 const CdmConfig& cdm_config, |
37 blink::WebContentDecryptionModuleResult result); | 37 blink::WebContentDecryptionModuleResult result); |
38 | 38 |
39 virtual ~WebContentDecryptionModuleImpl(); | 39 virtual ~WebContentDecryptionModuleImpl(); |
40 | 40 |
41 // blink::WebContentDecryptionModule implementation. | 41 // blink::WebContentDecryptionModule implementation. |
42 virtual blink::WebContentDecryptionModuleSession* createSession(); | 42 virtual blink::WebContentDecryptionModuleSession* createSession(); |
43 | 43 |
44 virtual void setServerCertificate( | 44 virtual void setServerCertificate( |
45 const uint8* server_certificate, | 45 const uint8* server_certificate, |
46 size_t server_certificate_length, | 46 size_t server_certificate_length, |
(...skipping 17 matching lines...) Expand all Loading... |
64 | 64 |
65 // Allow typecasting from blink type as this is the only implementation. | 65 // Allow typecasting from blink type as this is the only implementation. |
66 inline WebContentDecryptionModuleImpl* ToWebContentDecryptionModuleImpl( | 66 inline WebContentDecryptionModuleImpl* ToWebContentDecryptionModuleImpl( |
67 blink::WebContentDecryptionModule* cdm) { | 67 blink::WebContentDecryptionModule* cdm) { |
68 return static_cast<WebContentDecryptionModuleImpl*>(cdm); | 68 return static_cast<WebContentDecryptionModuleImpl*>(cdm); |
69 } | 69 } |
70 | 70 |
71 } // namespace media | 71 } // namespace media |
72 | 72 |
73 #endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ | 73 #endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ |
OLD | NEW |