| 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/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "media/base/cdm_factory.h" | 10 #include "media/base/cdm_factory.h" |
| 11 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleAccess.h" | 11 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleAccess.h" |
| 12 #include "third_party/WebKit/public/platform/WebMediaKeySystemConfiguration.h" |
| 12 #include "third_party/WebKit/public/platform/WebString.h" | 13 #include "third_party/WebKit/public/platform/WebString.h" |
| 13 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | 14 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
| 14 | 15 |
| 15 namespace blink { | 16 namespace blink { |
| 16 class WebLocalFrame; | 17 class WebLocalFrame; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace media { | 20 namespace media { |
| 20 | 21 |
| 21 class WebContentDecryptionModuleAccessImpl | 22 class WebContentDecryptionModuleAccessImpl |
| 22 : public blink::WebContentDecryptionModuleAccess { | 23 : public blink::WebContentDecryptionModuleAccess { |
| 23 public: | 24 public: |
| 24 static WebContentDecryptionModuleAccessImpl* Create( | 25 static WebContentDecryptionModuleAccessImpl* Create( |
| 25 const blink::WebString& key_system, | 26 const blink::WebString& key_system, |
| 27 const blink::WebMediaKeySystemConfiguration& configuration, |
| 26 const blink::WebSecurityOrigin& security_origin, | 28 const blink::WebSecurityOrigin& security_origin, |
| 27 CdmFactory* cdm_factory); | 29 CdmFactory* cdm_factory); |
| 28 virtual ~WebContentDecryptionModuleAccessImpl(); | 30 virtual ~WebContentDecryptionModuleAccessImpl(); |
| 29 | 31 |
| 30 // blink::WebContentDecryptionModuleAccess interface. | 32 // blink::WebContentDecryptionModuleAccess interface. |
| 33 virtual blink::WebMediaKeySystemConfiguration getConfiguration(); |
| 31 virtual void createContentDecryptionModule( | 34 virtual void createContentDecryptionModule( |
| 32 blink::WebContentDecryptionModuleResult result) override; | 35 blink::WebContentDecryptionModuleResult result); |
| 33 | 36 |
| 34 private: | 37 private: |
| 35 WebContentDecryptionModuleAccessImpl( | 38 WebContentDecryptionModuleAccessImpl( |
| 36 const blink::WebString& key_system, | 39 const blink::WebString& key_system, |
| 40 const blink::WebMediaKeySystemConfiguration& configuration, |
| 37 const blink::WebSecurityOrigin& security_origin, | 41 const blink::WebSecurityOrigin& security_origin, |
| 38 CdmFactory* cdm_factory); | 42 CdmFactory* cdm_factory); |
| 39 | 43 |
| 40 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleAccessImpl); | 44 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleAccessImpl); |
| 41 | 45 |
| 42 blink::WebString key_system_; | 46 blink::WebString key_system_; |
| 47 blink::WebMediaKeySystemConfiguration configuration_; |
| 43 blink::WebSecurityOrigin security_origin_; | 48 blink::WebSecurityOrigin security_origin_; |
| 44 CdmFactory* cdm_factory_; | 49 CdmFactory* cdm_factory_; |
| 45 }; | 50 }; |
| 46 | 51 |
| 47 } // namespace media | 52 } // namespace media |
| 48 | 53 |
| 49 #endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULEACCESS_IMPL_H_ | 54 #endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULEACCESS_IMPL_H_ |
| OLD | NEW |