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

Side by Side Diff: media/crypto/aes_decryptor.cc

Issue 17381007: EME: ProxyDecryptor creates MediaKeys instead of Decryptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 months 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 | Annotate | Revision Log
« no previous file with comments | « media/crypto/aes_decryptor.h ('k') | webkit/renderer/media/crypto/ppapi_decryptor.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "media/crypto/aes_decryptor.h" 5 #include "media/crypto/aes_decryptor.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 if (!new_video_key_cb_.is_null()) 205 if (!new_video_key_cb_.is_null())
206 new_video_key_cb_.Run(); 206 new_video_key_cb_.Run();
207 207
208 key_added_cb_.Run(session_id); 208 key_added_cb_.Run(session_id);
209 } 209 }
210 210
211 void AesDecryptor::CancelKeyRequest(const std::string& session_id) { 211 void AesDecryptor::CancelKeyRequest(const std::string& session_id) {
212 } 212 }
213 213
214 MediaKeys* AesDecryptor::GetMediaKeys() { 214 Decryptor* AesDecryptor::GetDecryptor() {
215 return this; 215 return this;
216 } 216 }
217 217
218 void AesDecryptor::RegisterNewKeyCB(StreamType stream_type, 218 void AesDecryptor::RegisterNewKeyCB(StreamType stream_type,
219 const NewKeyCB& new_key_cb) { 219 const NewKeyCB& new_key_cb) {
220 switch (stream_type) { 220 switch (stream_type) {
221 case kAudio: 221 case kAudio:
222 new_audio_key_cb_ = new_key_cb; 222 new_audio_key_cb_ = new_key_cb;
223 break; 223 break;
224 case kVideo: 224 case kVideo:
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 bool AesDecryptor::DecryptionKey::Init() { 329 bool AesDecryptor::DecryptionKey::Init() {
330 CHECK(!secret_.empty()); 330 CHECK(!secret_.empty());
331 decryption_key_.reset(crypto::SymmetricKey::Import( 331 decryption_key_.reset(crypto::SymmetricKey::Import(
332 crypto::SymmetricKey::AES, secret_)); 332 crypto::SymmetricKey::AES, secret_));
333 if (!decryption_key_) 333 if (!decryption_key_)
334 return false; 334 return false;
335 return true; 335 return true;
336 } 336 }
337 337
338 } // namespace media 338 } // namespace media
OLDNEW
« no previous file with comments | « media/crypto/aes_decryptor.h ('k') | webkit/renderer/media/crypto/ppapi_decryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698