| 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 MEDIA_CRYPTO_AES_DECRYPTOR_H_ | 5 #ifndef MEDIA_CRYPTO_AES_DECRYPTOR_H_ |
| 6 #define MEDIA_CRYPTO_AES_DECRYPTOR_H_ | 6 #define MEDIA_CRYPTO_AES_DECRYPTOR_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 public: | 29 public: |
| 30 AesDecryptor(const SessionCreatedCB& session_created_cb, | 30 AesDecryptor(const SessionCreatedCB& session_created_cb, |
| 31 const SessionMessageCB& session_message_cb, | 31 const SessionMessageCB& session_message_cb, |
| 32 const SessionReadyCB& session_ready_cb, | 32 const SessionReadyCB& session_ready_cb, |
| 33 const SessionClosedCB& session_closed_cb, | 33 const SessionClosedCB& session_closed_cb, |
| 34 const SessionErrorCB& session_error_cb); | 34 const SessionErrorCB& session_error_cb); |
| 35 virtual ~AesDecryptor(); | 35 virtual ~AesDecryptor(); |
| 36 | 36 |
| 37 // MediaKeys implementation. | 37 // MediaKeys implementation. |
| 38 virtual bool CreateSession(uint32 session_id, | 38 virtual bool CreateSession(uint32 session_id, |
| 39 const std::string& type, | 39 const std::string& content_type, |
| 40 const uint8* init_data, | 40 const uint8* init_data, |
| 41 int init_data_length) OVERRIDE; | 41 int init_data_length) OVERRIDE; |
| 42 virtual void LoadSession(uint32 session_id, |
| 43 const std::string& web_session_id) OVERRIDE; |
| 42 virtual void UpdateSession(uint32 session_id, | 44 virtual void UpdateSession(uint32 session_id, |
| 43 const uint8* response, | 45 const uint8* response, |
| 44 int response_length) OVERRIDE; | 46 int response_length) OVERRIDE; |
| 45 virtual void ReleaseSession(uint32 session_id) OVERRIDE; | 47 virtual void ReleaseSession(uint32 session_id) OVERRIDE; |
| 46 virtual Decryptor* GetDecryptor() OVERRIDE; | 48 virtual Decryptor* GetDecryptor() OVERRIDE; |
| 47 | 49 |
| 48 // Decryptor implementation. | 50 // Decryptor implementation. |
| 49 virtual void RegisterNewKeyCB(StreamType stream_type, | 51 virtual void RegisterNewKeyCB(StreamType stream_type, |
| 50 const NewKeyCB& key_added_cb) OVERRIDE; | 52 const NewKeyCB& key_added_cb) OVERRIDE; |
| 51 virtual void Decrypt(StreamType stream_type, | 53 virtual void Decrypt(StreamType stream_type, |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 // Protect |new_audio_key_cb_| and |new_video_key_cb_| as they are set on the | 140 // Protect |new_audio_key_cb_| and |new_video_key_cb_| as they are set on the |
| 139 // main thread but called on the media thread. | 141 // main thread but called on the media thread. |
| 140 mutable base::Lock new_key_cb_lock_; | 142 mutable base::Lock new_key_cb_lock_; |
| 141 | 143 |
| 142 DISALLOW_COPY_AND_ASSIGN(AesDecryptor); | 144 DISALLOW_COPY_AND_ASSIGN(AesDecryptor); |
| 143 }; | 145 }; |
| 144 | 146 |
| 145 } // namespace media | 147 } // namespace media |
| 146 | 148 |
| 147 #endif // MEDIA_CRYPTO_AES_DECRYPTOR_H_ | 149 #endif // MEDIA_CRYPTO_AES_DECRYPTOR_H_ |
| OLD | NEW |