Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_RENDERER_MEDIA_CRYPTO_ENCRYPTED_MEDIA_SUPPORT_H_ | |
| 6 #define CONTENT_RENDERER_MEDIA_CRYPTO_ENCRYPTED_MEDIA_SUPPORT_H_ | |
| 7 | |
| 8 #include "media/base/decryptor.h" | |
| 9 #include "media/base/demuxer.h" | |
| 10 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" | |
| 11 | |
| 12 namespace blink { | |
| 13 class WebContentDecryptionModule; | |
| 14 class WebContentDecryptionModuleResult; | |
| 15 class WebLocalFrame; | |
| 16 class WebMediaPlayerClient; | |
| 17 class WebString; | |
| 18 } | |
| 19 | |
| 20 namespace content { | |
| 21 | |
| 22 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
| |
| 23 public: | |
| 24 static scoped_ptr<EncryptedMediaSupport> create( | |
| 25 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.
| |
| 26 | |
| 27 EncryptedMediaSupport() { } | |
| 28 virtual ~EncryptedMediaSupport(); | |
| 29 | |
| 30 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.
| |
| 31 blink::WebLocalFrame* frame, | |
| 32 const blink::WebString& key_system, | |
| 33 const unsigned char* init_data, | |
| 34 unsigned init_data_length) = 0; | |
| 35 | |
| 36 virtual blink::WebMediaPlayer::MediaKeyException addKey( | |
| 37 const blink::WebString& key_system, | |
| 38 const unsigned char* key, | |
| 39 unsigned key_length, | |
| 40 const unsigned char* init_data, | |
| 41 unsigned init_data_length, | |
| 42 const blink::WebString& session_id) = 0; | |
| 43 | |
| 44 virtual blink::WebMediaPlayer::MediaKeyException cancelKeyRequest( | |
| 45 const blink::WebString& key_system, | |
| 46 const blink::WebString& session_id) = 0; | |
| 47 | |
| 48 virtual void setContentDecryptionModule( | |
| 49 blink::WebContentDecryptionModule* cdm) = 0; | |
| 50 virtual void setContentDecryptionModule( | |
| 51 blink::WebContentDecryptionModule* cdm, | |
| 52 blink::WebContentDecryptionModuleResult result) = 0; | |
| 53 virtual void setContentDecryptionModuleSync( | |
| 54 blink::WebContentDecryptionModule* cdm) = 0; | |
| 55 | |
| 56 virtual media::Demuxer::NeedKeyCB CreateNeedKeyCB() = 0; | |
| 57 virtual media::SetDecryptorReadyCB CreateSetDecryptorReadyCB() = 0; | |
| 58 virtual void OnDecryptError() = 0; | |
| 59 | |
| 60 private: | |
| 61 DISALLOW_COPY_AND_ASSIGN(EncryptedMediaSupport); | |
| 62 }; | |
| 63 | |
| 64 } // namespace content | |
| 65 | |
| 66 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_ENCRYPTED_MEDIA_SUPPORT_H_ | |
| OLD | NEW |