Index: content/renderer/media/cdm_session_adapter.h |
diff --git a/content/renderer/media/cdm_session_adapter.h b/content/renderer/media/cdm_session_adapter.h |
index 7e32669962268deb2e75cc79f5f76de5bddd8666..66c24d07976a0cdb717cb2964abfd92769552f00 100644 |
--- a/content/renderer/media/cdm_session_adapter.h |
+++ b/content/renderer/media/cdm_session_adapter.h |
@@ -47,6 +47,12 @@ class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> { |
const std::string& key_system, |
const GURL& security_origin); |
+ // Provide a server certificate to be used to encrypt messages to the |
xhwang
2014/09/25 05:11:47
Provide_s_
jrummell
2014/09/25 20:33:25
Done.
|
+ // license server. Takes ownership of |promise|. |
xhwang
2014/09/25 05:11:47
nit: "Takes ownership of |promise|." is redundant
jrummell
2014/09/25 20:33:25
Done.
|
+ void SetServerCertificate(const uint8* server_certificate, |
+ int server_certificate_length, |
+ scoped_ptr<media::SimpleCdmPromise> promise); |
+ |
// Creates a new session and adds it to the internal map. The caller owns the |
// created session. RemoveSession() must be called when destroying it, if |
// RegisterSession() was called. |
@@ -60,7 +66,7 @@ class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> { |
base::WeakPtr<WebContentDecryptionModuleSessionImpl> session); |
// Removes a session from the internal map. |
- void RemoveSession(const std::string& web_session_id); |
+ void UnregisterSession(const std::string& web_session_id); |
// Initializes a session with the |init_data_type|, |init_data| and |
// |session_type| provided. Takes ownership of |promise|. |
@@ -77,10 +83,20 @@ class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> { |
int response_length, |
scoped_ptr<media::SimpleCdmPromise> promise); |
- // Releases the session specified by |web_session_id|. |
+ // Closes the session specified by |web_session_id|. |
// Takes ownership of |promise|. |
xhwang
2014/09/25 05:11:47
ditto
jrummell
2014/09/25 20:33:25
Done.
|
- void ReleaseSession(const std::string& web_session_id, |
- scoped_ptr<media::SimpleCdmPromise> promise); |
+ void CloseSession(const std::string& web_session_id, |
+ scoped_ptr<media::SimpleCdmPromise> promise); |
+ |
+ // Remove stored session data associated with the session specified by |
xhwang
2014/09/25 05:11:47
Remove_s_
jrummell
2014/09/25 20:33:25
Done.
|
+ // |web_session_id|. Takes ownership of |promise|. |
xhwang
2014/09/25 05:11:47
ditto
jrummell
2014/09/25 20:33:25
Done.
|
+ void RemoveSession(const std::string& web_session_id, |
+ scoped_ptr<media::SimpleCdmPromise> promise); |
+ |
+ // Retrieve the key IDs for keys in the session that the CDM knows are |
xhwang
2014/09/25 05:11:47
Retrieve_s_
jrummell
2014/09/25 20:33:25
Done.
|
+ // currently usable to decrypt media data. |
+ void GetUsableKeyIds(const std::string& web_session_id, |
+ scoped_ptr<media::KeyIdsPromise> promise); |
// Returns the Decryptor associated with this CDM. May be NULL if no |
// Decryptor is associated with the MediaKeys object. |
@@ -109,6 +125,10 @@ class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> { |
void OnSessionMessage(const std::string& web_session_id, |
const std::vector<uint8>& message, |
const GURL& destination_url); |
+ void OnSessionKeysChange(const std::string& web_session_id, |
+ bool has_additional_usable_key); |
+ void OnSessionExpirationChange(const std::string& web_session_id, |
+ double new_expiry_time); |
xhwang
2014/09/25 05:11:47
expiration is an attribute... and expirationchange
xhwang
2014/09/25 05:11:47
What is the unit of this time? I saw at one point
jrummell
2014/09/25 20:33:25
Good idea. Done.
jrummell
2014/09/25 20:33:25
Changed to OnSessionExpirationUpdate.
|
void OnSessionReady(const std::string& web_session_id); |
void OnSessionClosed(const std::string& web_session_id); |
void OnSessionError(const std::string& web_session_id, |