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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 int response_length, | 53 int response_length, |
54 scoped_ptr<SimpleCdmPromise> promise) override; | 54 scoped_ptr<SimpleCdmPromise> promise) override; |
55 void CloseSession(const std::string& session_id, | 55 void CloseSession(const std::string& session_id, |
56 scoped_ptr<SimpleCdmPromise> promise) override; | 56 scoped_ptr<SimpleCdmPromise> promise) override; |
57 void RemoveSession(const std::string& session_id, | 57 void RemoveSession(const std::string& session_id, |
58 scoped_ptr<SimpleCdmPromise> promise) override; | 58 scoped_ptr<SimpleCdmPromise> promise) override; |
59 CdmContext* GetCdmContext() override; | 59 CdmContext* GetCdmContext() override; |
60 | 60 |
61 // CdmContext implementation. | 61 // CdmContext implementation. |
62 Decryptor* GetDecryptor() override; | 62 Decryptor* GetDecryptor() override; |
63 #if defined(ENABLE_BROWSER_CDMS) | |
64 int GetCdmId() const override; | 63 int GetCdmId() const override; |
65 #endif // defined(ENABLE_BROWSER_CDMS) | |
66 | 64 |
67 // Decryptor implementation. | 65 // Decryptor implementation. |
68 void RegisterNewKeyCB(StreamType stream_type, | 66 void RegisterNewKeyCB(StreamType stream_type, |
69 const NewKeyCB& key_added_cb) override; | 67 const NewKeyCB& key_added_cb) override; |
70 void Decrypt(StreamType stream_type, | 68 void Decrypt(StreamType stream_type, |
71 const scoped_refptr<DecoderBuffer>& encrypted, | 69 const scoped_refptr<DecoderBuffer>& encrypted, |
72 const DecryptCB& decrypt_cb) override; | 70 const DecryptCB& decrypt_cb) override; |
73 void CancelDecrypt(StreamType stream_type) override; | 71 void CancelDecrypt(StreamType stream_type) override; |
74 void InitializeAudioDecoder(const AudioDecoderConfig& config, | 72 void InitializeAudioDecoder(const AudioDecoderConfig& config, |
75 const DecoderInitCB& init_cb) override; | 73 const DecoderInitCB& init_cb) override; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 // Protect |new_audio_key_cb_| and |new_video_key_cb_| as they are set on the | 154 // Protect |new_audio_key_cb_| and |new_video_key_cb_| as they are set on the |
157 // main thread but called on the media thread. | 155 // main thread but called on the media thread. |
158 mutable base::Lock new_key_cb_lock_; | 156 mutable base::Lock new_key_cb_lock_; |
159 | 157 |
160 DISALLOW_COPY_AND_ASSIGN(AesDecryptor); | 158 DISALLOW_COPY_AND_ASSIGN(AesDecryptor); |
161 }; | 159 }; |
162 | 160 |
163 } // namespace media | 161 } // namespace media |
164 | 162 |
165 #endif // MEDIA_CRYPTO_AES_DECRYPTOR_H_ | 163 #endif // MEDIA_CRYPTO_AES_DECRYPTOR_H_ |
OLD | NEW |