Chromium Code Reviews| Index: media/base/media_keys.h |
| diff --git a/media/base/media_keys.h b/media/base/media_keys.h |
| index 063e54b1058d421a0ab89ba7dd1411cbc905619e..419a436d68bd09fc7beebbd87df33a929dfdd243 100644 |
| --- a/media/base/media_keys.h |
| +++ b/media/base/media_keys.h |
| @@ -72,6 +72,12 @@ class MEDIA_EXPORT MediaKeys { |
| MediaKeys(); |
| virtual ~MediaKeys(); |
| + // Provide a server certificate to be used to encrypt messages to the |
| + // license server. |
| + virtual void SetServerCertificate(const uint8* certificate_data, |
| + int certificate_data_length, |
| + scoped_ptr<SimpleCdmPromise> promise) = 0; |
| + |
| // Creates a session with the |init_data_type|, |init_data| and |session_type| |
| // provided. |
| // Note: UpdateSession() and ReleaseSession() should only be called after |
| @@ -94,9 +100,19 @@ class MEDIA_EXPORT MediaKeys { |
| int response_length, |
| scoped_ptr<SimpleCdmPromise> promise) = 0; |
| - // Releases the session specified by |web_session_id|. |
| - virtual void ReleaseSession(const std::string& web_session_id, |
| - scoped_ptr<SimpleCdmPromise> promise) = 0; |
| + // Closes the session specified by |web_session_id|. |
| + virtual void CloseSession(const std::string& web_session_id, |
| + scoped_ptr<SimpleCdmPromise> promise) = 0; |
| + |
| + // Remove stored session data associated with the session specified by |
| + // |web_session_id|. |
| + virtual void RemoveSession(const std::string& web_session_id, |
| + scoped_ptr<SimpleCdmPromise> promise) = 0; |
| + |
| + // Retrieve the key IDs for keys in the session that the CDM knows are |
| + // currently usable to decrypt media data. |
| + virtual void GetUsableKeyIds(const std::string& web_session_id, |
| + scoped_ptr<KeyIdsPromise> promise) = 0; |
| // Gets the Decryptor object associated with the MediaKeys. Returns NULL if |
| // no Decryptor object is associated. The returned object is only guaranteed |
| @@ -113,6 +129,13 @@ typedef base::Callback<void(const std::string& web_session_id, |
| const std::vector<uint8>& message, |
| const GURL& destination_url)> SessionMessageCB; |
| +typedef base::Callback<void(const std::string& web_session_id, |
|
ddorwin
2014/09/10 22:58:39
nit: For the methods, we have GetUsableKeyIds() at
jrummell
2014/09/11 21:21:55
Done.
|
| + bool has_additional_usable_key)> |
| + SessionKeysChangeCB; |
| + |
| +typedef base::Callback<void(const std::string& web_session_id, |
| + double new_expiry_time)> SessionExpirationChangeCB; |
| + |
| typedef base::Callback<void(const std::string& web_session_id)> SessionReadyCB; |
| typedef base::Callback<void(const std::string& web_session_id)> SessionClosedCB; |