Chromium Code Reviews| 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 { |
| + public: |
| + static scoped_ptr<EncryptedMediaSupport> create( |
| + blink::WebMediaPlayerClient* client); |
| + |
| + EncryptedMediaSupport() { } |
| + virtual ~EncryptedMediaSupport(); |
| + |
| + virtual blink::WebMediaPlayer::MediaKeyException generateKeyRequest( |
|
ddorwin
2014/08/22 21:08:47
Since we're changing things and this class is used
acolwell GONE FROM CHROMIUM
2014/08/22 23:20:22
Kept names as-is but added comment based on offlin
|
| + 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; |
|
ddorwin
2014/08/22 21:08:48
Should there be some documentation that the CB is
acolwell GONE FROM CHROMIUM
2014/08/22 23:20:22
I don't understand what you mean here. I added a c
|
| + virtual media::SetDecryptorReadyCB CreateSetDecryptorReadyCB() = 0; |
| + virtual void OnDecryptError() = 0; |
|
ddorwin
2014/08/22 21:08:48
This seems like something that the support impl wo
acolwell GONE FROM CHROMIUM
2014/08/22 23:20:22
Done.
|
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(EncryptedMediaSupport); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_RENDERER_MEDIA_CRYPTO_ENCRYPTED_MEDIA_SUPPORT_H_ |