| 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 CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 #include "third_party/WebKit/public/platform/WebContentDecryptionModule.h" | 13 #include "third_party/WebKit/public/platform/WebContentDecryptionModule.h" |
| 14 // TODO(dcheng): Remove and convert back to a forward declare. |
| 15 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 14 | 16 |
| 15 namespace blink { | 17 namespace blink { |
| 16 class WebFrame; | |
| 17 class WebSecurityOrigin; | 18 class WebSecurityOrigin; |
| 18 } | 19 } |
| 19 | 20 |
| 20 namespace media { | 21 namespace media { |
| 21 class Decryptor; | 22 class Decryptor; |
| 22 class MediaKeys; | 23 class MediaKeys; |
| 23 } | 24 } |
| 24 | 25 |
| 25 namespace content { | 26 namespace content { |
| 26 | 27 |
| 27 class CdmSessionAdapter; | 28 class CdmSessionAdapter; |
| 28 class WebContentDecryptionModuleSessionImpl; | 29 class WebContentDecryptionModuleSessionImpl; |
| 29 | 30 |
| 30 class WebContentDecryptionModuleImpl | 31 class WebContentDecryptionModuleImpl |
| 31 : public blink::WebContentDecryptionModule { | 32 : public blink::WebContentDecryptionModule { |
| 32 public: | 33 public: |
| 33 static WebContentDecryptionModuleImpl* Create( | 34 static WebContentDecryptionModuleImpl* Create( |
| 34 blink::WebFrame* frame, | 35 blink::WebLocalFrame* frame, |
| 35 const blink::WebSecurityOrigin& security_origin, | 36 const blink::WebSecurityOrigin& security_origin, |
| 36 const base::string16& key_system); | 37 const base::string16& key_system); |
| 37 | 38 |
| 38 virtual ~WebContentDecryptionModuleImpl(); | 39 virtual ~WebContentDecryptionModuleImpl(); |
| 39 | 40 |
| 40 // Returns the Decryptor associated with this CDM. May be NULL if no | 41 // Returns the Decryptor associated with this CDM. May be NULL if no |
| 41 // Decryptor associated with the MediaKeys object. | 42 // Decryptor associated with the MediaKeys object. |
| 42 // TODO(jrummell): Figure out lifetimes, as WMPI may still use the decryptor | 43 // TODO(jrummell): Figure out lifetimes, as WMPI may still use the decryptor |
| 43 // after WebContentDecryptionModule is freed. http://crbug.com/330324 | 44 // after WebContentDecryptionModule is freed. http://crbug.com/330324 |
| 44 media::Decryptor* GetDecryptor(); | 45 media::Decryptor* GetDecryptor(); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 64 | 65 |
| 65 // Allow typecasting from blink type as this is the only implementation. | 66 // Allow typecasting from blink type as this is the only implementation. |
| 66 inline WebContentDecryptionModuleImpl* ToWebContentDecryptionModuleImpl( | 67 inline WebContentDecryptionModuleImpl* ToWebContentDecryptionModuleImpl( |
| 67 blink::WebContentDecryptionModule* cdm) { | 68 blink::WebContentDecryptionModule* cdm) { |
| 68 return static_cast<WebContentDecryptionModuleImpl*>(cdm); | 69 return static_cast<WebContentDecryptionModuleImpl*>(cdm); |
| 69 } | 70 } |
| 70 | 71 |
| 71 } // namespace content | 72 } // namespace content |
| 72 | 73 |
| 73 #endif // CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ | 74 #endif // CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ |
| OLD | NEW |