Chromium Code Reviews| Index: webkit/media/webmediaplayer_proxy.h |
| diff --git a/webkit/media/webmediaplayer_proxy.h b/webkit/media/webmediaplayer_proxy.h |
| index 7d9817aed5412246e79db9c1b7d2c90b31eadecf..c5f919fb6990f4527b5a34a0b54832596a8cccde 100644 |
| --- a/webkit/media/webmediaplayer_proxy.h |
| +++ b/webkit/media/webmediaplayer_proxy.h |
| @@ -12,6 +12,7 @@ |
| #include "base/memory/ref_counted.h" |
| #include "base/synchronization/lock.h" |
| #include "media/base/pipeline.h" |
| +#include "media/crypto/decryptor_client.h" |
| #include "media/filters/chunk_demuxer.h" |
| #include "media/filters/chunk_demuxer_client.h" |
| #include "media/filters/ffmpeg_video_decoder.h" |
| @@ -41,7 +42,8 @@ class WebMediaPlayerImpl; |
| // the render thread that WebMediaPlayerImpl is running on. |
| class WebMediaPlayerProxy |
| : public base::RefCountedThreadSafe<WebMediaPlayerProxy>, |
| - public media::ChunkDemuxerClient { |
| + public media::ChunkDemuxerClient, |
| + public media::DecryptorClient { |
| public: |
| WebMediaPlayerProxy(const scoped_refptr<base::MessageLoopProxy>& render_loop, |
| WebMediaPlayerImpl* webmediaplayer); |
| @@ -90,8 +92,8 @@ class WebMediaPlayerProxy |
| // ChunkDemuxerClient implementation. |
| virtual void DemuxerOpened(media::ChunkDemuxer* demuxer) OVERRIDE; |
| virtual void DemuxerClosed() OVERRIDE; |
| - virtual void KeyNeeded(scoped_array<uint8> init_data, |
| - int init_data_size) OVERRIDE; |
| + virtual void DemuxerKeyNeeded(scoped_array<uint8> init_data, |
| + int init_data_size) OVERRIDE; |
| // Methods for Demuxer communication. |
| void DemuxerStartWaitingForSeek(); |
| @@ -108,7 +110,40 @@ class WebMediaPlayerProxy |
| void DemuxerOpenedTask(const scoped_refptr<media::ChunkDemuxer>& demuxer); |
| void DemuxerClosedTask(); |
| - void KeyNeededTask(scoped_array<uint8> init_data, int init_data_size); |
| + |
| + // DecryptorClient implementation. |
| + virtual void KeyAdded(const std::string& key_system, |
| + const std::string& session_id) OVERRIDE; |
| + virtual void KeyError(const std::string& key_system, |
| + const std::string& session_id, |
| + media::AesDecryptor::KeyError error_code, |
| + int system_code) OVERRIDE; |
| + virtual void KeyMessage(const std::string& key_system, |
| + const std::string& session_id, |
| + scoped_array<uint8> message, |
| + int message_length, |
| + const std::string& default_url) OVERRIDE; |
| + virtual void KeyNeeded(const std::string& key_system, |
| + const std::string& session_id, |
| + scoped_array<uint8> init_data, |
| + int init_data_size) OVERRIDE; |
| + |
| + // Methods for DecryptorClient -> WebMediaPlayerImpl communication. |
|
ddorwin
2012/06/11 21:02:40
These should be private, right?
scherkus (not reviewing)
2012/06/12 03:15:58
yep
xhwang
2012/06/12 19:01:15
Done.
xhwang
2012/06/12 19:01:15
Done.
|
| + void KeyAddedTask(const std::string& key_system, |
| + const std::string& session_id); |
| + void KeyErrorTask(const std::string& key_system, |
| + const std::string& session_id, |
| + media::AesDecryptor::KeyError error_code, |
| + int system_code); |
| + void KeyMessageTask(const std::string& key_system, |
| + const std::string& session_id, |
| + scoped_array<uint8> message, |
| + int message_length, |
| + const std::string& default_url); |
| + void KeyNeededTask(const std::string& key_system, |
| + const std::string& session_id, |
| + scoped_array<uint8> init_data, |
| + int init_data_size); |
| private: |
| friend class base::RefCountedThreadSafe<WebMediaPlayerProxy>; |