Chromium Code Reviews| Index: media/cdm/aes_decryptor.h |
| diff --git a/media/cdm/aes_decryptor.h b/media/cdm/aes_decryptor.h |
| index e2462ca7a9793919ed8031803dab15ce947505d0..433abff0bf7f23b91e83f3e56ac05d07d219dbd4 100644 |
| --- a/media/cdm/aes_decryptor.h |
| +++ b/media/cdm/aes_decryptor.h |
| @@ -27,24 +27,23 @@ namespace media { |
| // encryption must be CTR with a key size of 128bits. |
| class MEDIA_EXPORT AesDecryptor : public MediaKeys, public Decryptor { |
| public: |
| - AesDecryptor(const SessionCreatedCB& session_created_cb, |
| - const SessionMessageCB& session_message_cb, |
| - const SessionReadyCB& session_ready_cb, |
| - const SessionClosedCB& session_closed_cb, |
| - const SessionErrorCB& session_error_cb); |
| + AesDecryptor(const SessionMessageCB& session_message_cb); |
|
xhwang
2014/05/23 06:01:23
explicit
jrummell
2014/05/29 00:54:40
Done.
|
| virtual ~AesDecryptor(); |
| // MediaKeys implementation. |
| - virtual bool CreateSession(uint32 session_id, |
| - const std::string& content_type, |
| + virtual void CreateSession(const std::string& init_data_type, |
| const uint8* init_data, |
| - int init_data_length) OVERRIDE; |
| - virtual void LoadSession(uint32 session_id, |
| - const std::string& web_session_id) OVERRIDE; |
| - virtual void UpdateSession(uint32 session_id, |
| + int init_data_length, |
| + SessionType session_type, |
| + scoped_ptr<NewSessionCdmPromise> promise) OVERRIDE; |
| + virtual void LoadSession(const std::string& web_session_id, |
| + scoped_ptr<NewSessionCdmPromise> promise) OVERRIDE; |
| + virtual void UpdateSession(const std::string& web_session_id, |
| const uint8* response, |
| - int response_length) OVERRIDE; |
| - virtual void ReleaseSession(uint32 session_id) OVERRIDE; |
| + int response_length, |
| + scoped_ptr<SimpleCdmPromise> promise) OVERRIDE; |
| + virtual void ReleaseSession(const std::string& web_session_id, |
| + scoped_ptr<SimpleCdmPromise> promise) OVERRIDE; |
| virtual Decryptor* GetDecryptor() OVERRIDE; |
| // Decryptor implementation. |
| @@ -103,7 +102,7 @@ class MEDIA_EXPORT AesDecryptor : public MediaKeys, public Decryptor { |
| // Creates a DecryptionKey using |key_string| and associates it with |key_id|. |
| // Returns true if successful. |
| - bool AddDecryptionKey(const uint32 session_id, |
| + bool AddDecryptionKey(const std::string& web_session_id, |
| const std::string& key_id, |
| const std::string& key_string); |
| @@ -111,15 +110,11 @@ class MEDIA_EXPORT AesDecryptor : public MediaKeys, public Decryptor { |
| // the key. Returns NULL if no key is associated with |key_id|. |
| DecryptionKey* GetKey(const std::string& key_id) const; |
| - // Deletes all keys associated with |session_id|. |
| - void DeleteKeysForSession(const uint32 session_id); |
| + // Deletes all keys associated with |web_session_id|. |
| + void DeleteKeysForSession(const std::string& web_session_id); |
| // Callbacks for firing session events. |
| - SessionCreatedCB session_created_cb_; |
| SessionMessageCB session_message_cb_; |
| - SessionReadyCB session_ready_cb_; |
| - SessionClosedCB session_closed_cb_; |
| - SessionErrorCB session_error_cb_; |
| // Since only Decrypt() is called off the renderer thread, we only need to |
| // protect |key_map_|, the only member variable that is shared between |
| @@ -127,8 +122,8 @@ class MEDIA_EXPORT AesDecryptor : public MediaKeys, public Decryptor { |
| KeyIdToSessionKeysMap key_map_; // Protected by |key_map_lock_|. |
| mutable base::Lock key_map_lock_; // Protects the |key_map_|. |
| - // Keeps track of current valid session IDs. |
| - std::set<uint32> valid_sessions_; |
| + // Keeps track of current valid sessions. |
| + std::set<std::string> valid_sessions_; |
| // Make web session ID unique per renderer by making it static. Web session |
| // IDs seen by the app will be "1", "2", etc. |