summaryrefslogtreecommitdiffstats
path: root/content/renderer/media/webcontentdecryptionmodule_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'content/renderer/media/webcontentdecryptionmodule_impl.h')
-rw-r--r--content/renderer/media/webcontentdecryptionmodule_impl.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/content/renderer/media/webcontentdecryptionmodule_impl.h b/content/renderer/media/webcontentdecryptionmodule_impl.h
index ecd5198..50cf6d1 100644
--- a/content/renderer/media/webcontentdecryptionmodule_impl.h
+++ b/content/renderer/media/webcontentdecryptionmodule_impl.h
@@ -12,6 +12,7 @@
#include "third_party/WebKit/public/platform/WebContentDecryptionModule.h"
namespace media {
+class Decryptor;
class MediaKeys;
}
@@ -28,6 +29,12 @@ class WebContentDecryptionModuleImpl
virtual ~WebContentDecryptionModuleImpl();
+ // Returns the Decryptor associated with this CDM. May be NULL if no
+ // Decryptor associated with the MediaKeys object.
+ // TODO(jrummell): Figure out lifetimes, as WMPI may still use the decryptor
+ // after WebContentDecryptionModule is freed. http://crbug.com/330324
+ media::Decryptor* GetDecryptor();
+
// blink::WebContentDecryptionModule implementation.
virtual blink::WebContentDecryptionModuleSession* createSession(
blink::WebContentDecryptionModuleSession::Client* client);
@@ -46,6 +53,12 @@ class WebContentDecryptionModuleImpl
DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleImpl);
};
+// Allow typecasting from blink type as this is the only implementation.
+inline WebContentDecryptionModuleImpl* ToWebContentDecryptionModuleImpl(
+ blink::WebContentDecryptionModule* cdm) {
+ return static_cast<WebContentDecryptionModuleImpl*>(cdm);
+}
+
} // namespace content
#endif // CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_