Index: content/renderer/media/crypto/encrypted_media_support.h |
diff --git a/content/renderer/media/crypto/encrypted_media_support.h b/content/renderer/media/crypto/encrypted_media_support.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ba67a5db4d97b405341c5b0216819ce1ee3234c4 |
--- /dev/null |
+++ b/content/renderer/media/crypto/encrypted_media_support.h |
@@ -0,0 +1,66 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_RENDERER_MEDIA_CRYPTO_ENCRYPTED_MEDIA_SUPPORT_H_ |
+#define CONTENT_RENDERER_MEDIA_CRYPTO_ENCRYPTED_MEDIA_SUPPORT_H_ |
+ |
+#include "media/base/decryptor.h" |
+#include "media/base/demuxer.h" |
+#include "third_party/WebKit/public/platform/WebMediaPlayer.h" |
+ |
+namespace blink { |
+class WebContentDecryptionModule; |
+class WebContentDecryptionModuleResult; |
+class WebLocalFrame; |
+class WebMediaPlayerClient; |
+class WebString; |
+} |
+ |
+namespace content { |
+ |
+class EncryptedMediaSupport { |
xhwang
2014/08/22 20:52:51
This seems to be an interface with only one implem
acolwell GONE FROM CHROMIUM
2014/08/22 21:09:31
I need the interface so that when I move WMPI, I d
|
+ public: |
+ static scoped_ptr<EncryptedMediaSupport> create( |
+ blink::WebMediaPlayerClient* client); |
xhwang
2014/08/22 20:52:51
Can this return NULL? It seems so based on the new
acolwell GONE FROM CHROMIUM
2014/08/22 21:09:31
Yes. Done.
|
+ |
+ EncryptedMediaSupport() { } |
+ virtual ~EncryptedMediaSupport(); |
+ |
+ virtual blink::WebMediaPlayer::MediaKeyException generateKeyRequest( |
xhwang
2014/08/22 20:52:51
This is Chromium code, use Chromium style function
acolwell GONE FROM CHROMIUM
2014/08/22 21:09:31
Done.
|
+ blink::WebLocalFrame* frame, |
+ const blink::WebString& key_system, |
+ const unsigned char* init_data, |
+ unsigned init_data_length) = 0; |
+ |
+ virtual blink::WebMediaPlayer::MediaKeyException addKey( |
+ const blink::WebString& key_system, |
+ const unsigned char* key, |
+ unsigned key_length, |
+ const unsigned char* init_data, |
+ unsigned init_data_length, |
+ const blink::WebString& session_id) = 0; |
+ |
+ virtual blink::WebMediaPlayer::MediaKeyException cancelKeyRequest( |
+ const blink::WebString& key_system, |
+ const blink::WebString& session_id) = 0; |
+ |
+ virtual void setContentDecryptionModule( |
+ blink::WebContentDecryptionModule* cdm) = 0; |
+ virtual void setContentDecryptionModule( |
+ blink::WebContentDecryptionModule* cdm, |
+ blink::WebContentDecryptionModuleResult result) = 0; |
+ virtual void setContentDecryptionModuleSync( |
+ blink::WebContentDecryptionModule* cdm) = 0; |
+ |
+ virtual media::Demuxer::NeedKeyCB CreateNeedKeyCB() = 0; |
+ virtual media::SetDecryptorReadyCB CreateSetDecryptorReadyCB() = 0; |
+ virtual void OnDecryptError() = 0; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(EncryptedMediaSupport); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_RENDERER_MEDIA_CRYPTO_ENCRYPTED_MEDIA_SUPPORT_H_ |