| 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 #include <vector> | 10 #include <vector> |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // Keeps track of current valid sessions. | 147 // Keeps track of current valid sessions. |
| 148 std::set<std::string> valid_sessions_; | 148 std::set<std::string> valid_sessions_; |
| 149 | 149 |
| 150 // Make session ID unique per renderer by making it static. Session | 150 // Make session ID unique per renderer by making it static. Session |
| 151 // IDs seen by the app will be "1", "2", etc. | 151 // IDs seen by the app will be "1", "2", etc. |
| 152 static uint32_t next_session_id_; | 152 static uint32_t next_session_id_; |
| 153 | 153 |
| 154 NewKeyCB new_audio_key_cb_; | 154 NewKeyCB new_audio_key_cb_; |
| 155 NewKeyCB new_video_key_cb_; | 155 NewKeyCB new_video_key_cb_; |
| 156 | 156 |
| 157 // As AesDecryptor may be in a separate module (e.g. ClearKeyCdm), have a copy |
| 158 // of an empty GURL to avoid leaking the one created by GURL::EmptyGURL(). |
| 159 scoped_ptr<GURL> empty_gurl_; |
| 160 |
| 157 // Protect |new_audio_key_cb_| and |new_video_key_cb_| as they are set on the | 161 // Protect |new_audio_key_cb_| and |new_video_key_cb_| as they are set on the |
| 158 // main thread but called on the media thread. | 162 // main thread but called on the media thread. |
| 159 mutable base::Lock new_key_cb_lock_; | 163 mutable base::Lock new_key_cb_lock_; |
| 160 | 164 |
| 161 DISALLOW_COPY_AND_ASSIGN(AesDecryptor); | 165 DISALLOW_COPY_AND_ASSIGN(AesDecryptor); |
| 162 }; | 166 }; |
| 163 | 167 |
| 164 } // namespace media | 168 } // namespace media |
| 165 | 169 |
| 166 #endif // MEDIA_CRYPTO_AES_DECRYPTOR_H_ | 170 #endif // MEDIA_CRYPTO_AES_DECRYPTOR_H_ |
| OLD | NEW |