| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ | 6 #define CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 const media::SessionErrorCB& session_error_cb, | 41 const media::SessionErrorCB& session_error_cb, |
| 42 const media::SessionKeysChangeCB& session_keys_change_cb, | 42 const media::SessionKeysChangeCB& session_keys_change_cb, |
| 43 const media::SessionExpirationUpdateCB& session_expiration_update_cb); | 43 const media::SessionExpirationUpdateCB& session_expiration_update_cb); |
| 44 | 44 |
| 45 virtual ~PpapiDecryptor(); | 45 virtual ~PpapiDecryptor(); |
| 46 | 46 |
| 47 // media::MediaKeys implementation. | 47 // media::MediaKeys implementation. |
| 48 virtual void SetServerCertificate( | 48 virtual void SetServerCertificate( |
| 49 const uint8* certificate_data, | 49 const uint8* certificate_data, |
| 50 int certificate_data_length, | 50 int certificate_data_length, |
| 51 scoped_ptr<media::SimpleCdmPromise> promise) OVERRIDE; | 51 scoped_ptr<media::SimpleCdmPromise> promise) override; |
| 52 virtual void CreateSession( | 52 virtual void CreateSession( |
| 53 const std::string& init_data_type, | 53 const std::string& init_data_type, |
| 54 const uint8* init_data, | 54 const uint8* init_data, |
| 55 int init_data_length, | 55 int init_data_length, |
| 56 SessionType session_type, | 56 SessionType session_type, |
| 57 scoped_ptr<media::NewSessionCdmPromise> promise) OVERRIDE; | 57 scoped_ptr<media::NewSessionCdmPromise> promise) override; |
| 58 virtual void LoadSession( | 58 virtual void LoadSession( |
| 59 const std::string& web_session_id, | 59 const std::string& web_session_id, |
| 60 scoped_ptr<media::NewSessionCdmPromise> promise) OVERRIDE; | 60 scoped_ptr<media::NewSessionCdmPromise> promise) override; |
| 61 virtual void UpdateSession( | 61 virtual void UpdateSession( |
| 62 const std::string& web_session_id, | 62 const std::string& web_session_id, |
| 63 const uint8* response, | 63 const uint8* response, |
| 64 int response_length, | 64 int response_length, |
| 65 scoped_ptr<media::SimpleCdmPromise> promise) OVERRIDE; | 65 scoped_ptr<media::SimpleCdmPromise> promise) override; |
| 66 virtual void CloseSession( | 66 virtual void CloseSession( |
| 67 const std::string& web_session_id, | 67 const std::string& web_session_id, |
| 68 scoped_ptr<media::SimpleCdmPromise> promise) OVERRIDE; | 68 scoped_ptr<media::SimpleCdmPromise> promise) override; |
| 69 virtual void RemoveSession( | 69 virtual void RemoveSession( |
| 70 const std::string& web_session_id, | 70 const std::string& web_session_id, |
| 71 scoped_ptr<media::SimpleCdmPromise> promise) OVERRIDE; | 71 scoped_ptr<media::SimpleCdmPromise> promise) override; |
| 72 virtual void GetUsableKeyIds( | 72 virtual void GetUsableKeyIds( |
| 73 const std::string& web_session_id, | 73 const std::string& web_session_id, |
| 74 scoped_ptr<media::KeyIdsPromise> promise) OVERRIDE; | 74 scoped_ptr<media::KeyIdsPromise> promise) override; |
| 75 virtual Decryptor* GetDecryptor() OVERRIDE; | 75 virtual Decryptor* GetDecryptor() override; |
| 76 | 76 |
| 77 // media::Decryptor implementation. | 77 // media::Decryptor implementation. |
| 78 virtual void RegisterNewKeyCB(StreamType stream_type, | 78 virtual void RegisterNewKeyCB(StreamType stream_type, |
| 79 const NewKeyCB& key_added_cb) OVERRIDE; | 79 const NewKeyCB& key_added_cb) override; |
| 80 virtual void Decrypt(StreamType stream_type, | 80 virtual void Decrypt(StreamType stream_type, |
| 81 const scoped_refptr<media::DecoderBuffer>& encrypted, | 81 const scoped_refptr<media::DecoderBuffer>& encrypted, |
| 82 const DecryptCB& decrypt_cb) OVERRIDE; | 82 const DecryptCB& decrypt_cb) override; |
| 83 virtual void CancelDecrypt(StreamType stream_type) OVERRIDE; | 83 virtual void CancelDecrypt(StreamType stream_type) override; |
| 84 virtual void InitializeAudioDecoder(const media::AudioDecoderConfig& config, | 84 virtual void InitializeAudioDecoder(const media::AudioDecoderConfig& config, |
| 85 const DecoderInitCB& init_cb) OVERRIDE; | 85 const DecoderInitCB& init_cb) override; |
| 86 virtual void InitializeVideoDecoder(const media::VideoDecoderConfig& config, | 86 virtual void InitializeVideoDecoder(const media::VideoDecoderConfig& config, |
| 87 const DecoderInitCB& init_cb) OVERRIDE; | 87 const DecoderInitCB& init_cb) override; |
| 88 virtual void DecryptAndDecodeAudio( | 88 virtual void DecryptAndDecodeAudio( |
| 89 const scoped_refptr<media::DecoderBuffer>& encrypted, | 89 const scoped_refptr<media::DecoderBuffer>& encrypted, |
| 90 const AudioDecodeCB& audio_decode_cb) OVERRIDE; | 90 const AudioDecodeCB& audio_decode_cb) override; |
| 91 virtual void DecryptAndDecodeVideo( | 91 virtual void DecryptAndDecodeVideo( |
| 92 const scoped_refptr<media::DecoderBuffer>& encrypted, | 92 const scoped_refptr<media::DecoderBuffer>& encrypted, |
| 93 const VideoDecodeCB& video_decode_cb) OVERRIDE; | 93 const VideoDecodeCB& video_decode_cb) override; |
| 94 virtual void ResetDecoder(StreamType stream_type) OVERRIDE; | 94 virtual void ResetDecoder(StreamType stream_type) override; |
| 95 virtual void DeinitializeDecoder(StreamType stream_type) OVERRIDE; | 95 virtual void DeinitializeDecoder(StreamType stream_type) override; |
| 96 | 96 |
| 97 private: | 97 private: |
| 98 PpapiDecryptor( | 98 PpapiDecryptor( |
| 99 const std::string& key_system, | 99 const std::string& key_system, |
| 100 scoped_ptr<PepperCdmWrapper> pepper_cdm_wrapper, | 100 scoped_ptr<PepperCdmWrapper> pepper_cdm_wrapper, |
| 101 const media::SessionMessageCB& session_message_cb, | 101 const media::SessionMessageCB& session_message_cb, |
| 102 const media::SessionReadyCB& session_ready_cb, | 102 const media::SessionReadyCB& session_ready_cb, |
| 103 const media::SessionClosedCB& session_closed_cb, | 103 const media::SessionClosedCB& session_closed_cb, |
| 104 const media::SessionErrorCB& session_error_cb, | 104 const media::SessionErrorCB& session_error_cb, |
| 105 const media::SessionKeysChangeCB& session_keys_change_cb, | 105 const media::SessionKeysChangeCB& session_keys_change_cb, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 153 |
| 154 // NOTE: Weak pointers must be invalidated before all other member variables. | 154 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 155 base::WeakPtrFactory<PpapiDecryptor> weak_ptr_factory_; | 155 base::WeakPtrFactory<PpapiDecryptor> weak_ptr_factory_; |
| 156 | 156 |
| 157 DISALLOW_COPY_AND_ASSIGN(PpapiDecryptor); | 157 DISALLOW_COPY_AND_ASSIGN(PpapiDecryptor); |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 } // namespace content | 160 } // namespace content |
| 161 | 161 |
| 162 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ | 162 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ |
| OLD | NEW |