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

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

Issue 17289006: Separate CDM initialization from GenerateKeyRequest & remove key_system parameters. (Closed) Base URL: master
Patch Set: rebase only 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
« no previous file with comments | « media/base/media_keys.h ('k') | media/crypto/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 (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 #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 <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 16 matching lines...) Expand all
27 // encryption must be CTR with a key size of 128bits. 27 // encryption must be CTR with a key size of 128bits.
28 class MEDIA_EXPORT AesDecryptor : public MediaKeys, public Decryptor { 28 class MEDIA_EXPORT AesDecryptor : public MediaKeys, public Decryptor {
29 public: 29 public:
30 AesDecryptor(const KeyAddedCB& key_added_cb, 30 AesDecryptor(const KeyAddedCB& key_added_cb,
31 const KeyErrorCB& key_error_cb, 31 const KeyErrorCB& key_error_cb,
32 const KeyMessageCB& key_message_cb, 32 const KeyMessageCB& key_message_cb,
33 const NeedKeyCB& need_key_cb); 33 const NeedKeyCB& need_key_cb);
34 virtual ~AesDecryptor(); 34 virtual ~AesDecryptor();
35 35
36 // MediaKeys implementation. 36 // MediaKeys implementation.
37 virtual bool GenerateKeyRequest(const std::string& key_system, 37 virtual bool GenerateKeyRequest(const std::string& type,
38 const std::string& type,
39 const uint8* init_data, 38 const uint8* init_data,
40 int init_data_length) OVERRIDE; 39 int init_data_length) OVERRIDE;
41 virtual void AddKey(const std::string& key_system, 40 virtual void AddKey(const uint8* key, int key_length,
42 const uint8* key, int key_length,
43 const uint8* init_data, int init_data_length, 41 const uint8* init_data, int init_data_length,
44 const std::string& session_id) OVERRIDE; 42 const std::string& session_id) OVERRIDE;
45 virtual void CancelKeyRequest(const std::string& key_system, 43 virtual void CancelKeyRequest(const std::string& session_id) OVERRIDE;
46 const std::string& session_id) OVERRIDE;
47 44
48 // Decryptor implementation. 45 // Decryptor implementation.
49 virtual MediaKeys* GetMediaKeys() OVERRIDE; 46 virtual MediaKeys* GetMediaKeys() OVERRIDE;
50 virtual void RegisterNewKeyCB(StreamType stream_type, 47 virtual void RegisterNewKeyCB(StreamType stream_type,
51 const NewKeyCB& key_added_cb) OVERRIDE; 48 const NewKeyCB& key_added_cb) OVERRIDE;
52 virtual void Decrypt(StreamType stream_type, 49 virtual void Decrypt(StreamType stream_type,
53 const scoped_refptr<DecoderBuffer>& encrypted, 50 const scoped_refptr<DecoderBuffer>& encrypted,
54 const DecryptCB& decrypt_cb) OVERRIDE; 51 const DecryptCB& decrypt_cb) OVERRIDE;
55 virtual void CancelDecrypt(StreamType stream_type) OVERRIDE; 52 virtual void CancelDecrypt(StreamType stream_type) OVERRIDE;
56 virtual void InitializeAudioDecoder(const AudioDecoderConfig& config, 53 virtual void InitializeAudioDecoder(const AudioDecoderConfig& config,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 117
121 NewKeyCB new_audio_key_cb_; 118 NewKeyCB new_audio_key_cb_;
122 NewKeyCB new_video_key_cb_; 119 NewKeyCB new_video_key_cb_;
123 120
124 DISALLOW_COPY_AND_ASSIGN(AesDecryptor); 121 DISALLOW_COPY_AND_ASSIGN(AesDecryptor);
125 }; 122 };
126 123
127 } // namespace media 124 } // namespace media
128 125
129 #endif // MEDIA_CRYPTO_AES_DECRYPTOR_H_ 126 #endif // MEDIA_CRYPTO_AES_DECRYPTOR_H_
OLDNEW
« no previous file with comments | « media/base/media_keys.h ('k') | media/crypto/aes_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698