Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: media/cdm/aes_decryptor.h

Issue 2545083004: [eme] Handle multiple calls to MediaKeySession.close() (Closed)
Patch Set: rebase for MediaKeys rename Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/blink/webcontentdecryptionmodulesession_impl.cc ('k') | media/cdm/aes_decryptor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_CDM_AES_DECRYPTOR_H_ 5 #ifndef MEDIA_CDM_AES_DECRYPTOR_H_
6 #define MEDIA_CDM_AES_DECRYPTOR_H_ 6 #define MEDIA_CDM_AES_DECRYPTOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 SessionMessageCB session_message_cb_; 139 SessionMessageCB session_message_cb_;
140 SessionClosedCB session_closed_cb_; 140 SessionClosedCB session_closed_cb_;
141 SessionKeysChangeCB session_keys_change_cb_; 141 SessionKeysChangeCB session_keys_change_cb_;
142 142
143 // Since only Decrypt() is called off the renderer thread, we only need to 143 // Since only Decrypt() is called off the renderer thread, we only need to
144 // protect |key_map_|, the only member variable that is shared between 144 // protect |key_map_|, the only member variable that is shared between
145 // Decrypt() and other methods. 145 // Decrypt() and other methods.
146 KeyIdToSessionKeysMap key_map_; // Protected by |key_map_lock_|. 146 KeyIdToSessionKeysMap key_map_; // Protected by |key_map_lock_|.
147 mutable base::Lock key_map_lock_; // Protects the |key_map_|. 147 mutable base::Lock key_map_lock_; // Protects the |key_map_|.
148 148
149 // Keeps track of current valid sessions. 149 // Keeps track of current open sessions.
150 std::set<std::string> valid_sessions_; 150 std::set<std::string> open_sessions_;
151 151
152 // Make session ID unique per renderer by making it static. Session 152 // Make session ID unique per renderer by making it static. Session
153 // IDs seen by the app will be "1", "2", etc. 153 // IDs seen by the app will be "1", "2", etc.
154 static uint32_t next_session_id_; 154 static uint32_t next_session_id_;
155 155
156 NewKeyCB new_audio_key_cb_; 156 NewKeyCB new_audio_key_cb_;
157 NewKeyCB new_video_key_cb_; 157 NewKeyCB new_video_key_cb_;
158 158
159 // Protect |new_audio_key_cb_| and |new_video_key_cb_| as they are set on the 159 // Protect |new_audio_key_cb_| and |new_video_key_cb_| as they are set on the
160 // main thread but called on the media thread. 160 // main thread but called on the media thread.
161 mutable base::Lock new_key_cb_lock_; 161 mutable base::Lock new_key_cb_lock_;
162 162
163 DISALLOW_COPY_AND_ASSIGN(AesDecryptor); 163 DISALLOW_COPY_AND_ASSIGN(AesDecryptor);
164 }; 164 };
165 165
166 } // namespace media 166 } // namespace media
167 167
168 #endif // MEDIA_CDM_AES_DECRYPTOR_H_ 168 #endif // MEDIA_CDM_AES_DECRYPTOR_H_
OLDNEW
« no previous file with comments | « media/blink/webcontentdecryptionmodulesession_impl.cc ('k') | media/cdm/aes_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698