diff options
author | jrummell <jrummell@chromium.org> | 2014-09-07 17:38:31 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-08 00:40:15 +0000 |
commit | 1e9a7b144e268ac9310474352d8f54b0b03fe82a (patch) | |
tree | e02e7c3abea648e8fa46af7fe8f76fe38cf72c18 /ppapi/api | |
parent | cd7694afb928b265e64be5448bb281ad86771f34 (diff) | |
download | chromium_src-1e9a7b144e268ac9310474352d8f54b0b03fe82a.zip chromium_src-1e9a7b144e268ac9310474352d8f54b0b03fe82a.tar.gz chromium_src-1e9a7b144e268ac9310474352d8f54b0b03fe82a.tar.bz2 |
Update Pepper interface for EME
To support CDM_6, make the following changes:
- add SetServerCertificate
- add GetUsableKeyIds
- rename ReleaseSession to CloseSession
- add RemoveSession
- add SessionKeysChange event
- add SessionExpirationChange event
Includes changes to cdm_adapter for the new functionality. Changes to
use these new interfaces in blink in a future CL.
BUG=358271
TEST=existing EME tests still pass + manual testing
Review URL: https://codereview.chromium.org/496143002
Cr-Commit-Position: refs/heads/master@{#293672}
Diffstat (limited to 'ppapi/api')
-rw-r--r-- | ppapi/api/private/ppb_content_decryptor_private.idl | 51 | ||||
-rw-r--r-- | ppapi/api/private/ppp_content_decryptor_private.idl | 57 |
2 files changed, 101 insertions, 7 deletions
diff --git a/ppapi/api/private/ppb_content_decryptor_private.idl b/ppapi/api/private/ppb_content_decryptor_private.idl index e4dfd4f14..ad59210 100644 --- a/ppapi/api/private/ppb_content_decryptor_private.idl +++ b/ppapi/api/private/ppb_content_decryptor_private.idl @@ -33,7 +33,7 @@ interface PPB_ContentDecryptor_Private { [in] uint32_t promise_id); /** - * A promise has been resolved by the CDM. + * A promise that resulted in a new session has been resolved by the CDM. * * @param[in] promise_id Identifies the promise that the CDM resolved. * @@ -46,6 +46,20 @@ interface PPB_ContentDecryptor_Private { [in] PP_Var web_session_id); /** + * A promise that returns a set of key IDs has been resolved by the CDM. + * + * @param[in] promise_id Identifies the promise that the CDM resolved. + * + * @param[in] key_ids A <code>PP_Var</code> of type + * <code>PP_VARTYPE_ARRAY</code> containing elements of type + * <code>PP_VARTYPE_ARRAYBUFFER</code> that are the session's usable key IDs. + */ + void PromiseResolvedWithKeyIds( + [in] PP_Instance instance, + [in] uint32_t promise_id, + [in] PP_Var key_ids_array); + + /** * A promise has been rejected by the CDM due to an error. * * @param[in] promise_id Identifies the promise that the CDM rejected. @@ -80,8 +94,8 @@ interface PPB_ContentDecryptor_Private { * required to prepare for decryption. * * @param[in] web_session_id A <code>PP_Var</code> of type - * <code>PP_VARTYPE_STRING</code> containing the session's ID attribute for - * which the message is intended. + * <code>PP_VARTYPE_STRING</code> containing the ID of a session for + * which this message is intended. * * @param[in] message A <code>PP_Var</code> of type * <code>PP_VARTYPE_ARRAY_BUFFER</code> that contains the message. @@ -97,6 +111,37 @@ interface PPB_ContentDecryptor_Private { [in] PP_Var destination_url); /** + * The keys for a session have changed. + * + * @param[in] web_session_id A <code>PP_Var</code> of type + * <code>PP_VARTYPE_STRING</code> containing the ID of the session that has + * a change in keys. + * + * @param[in] has_additional_usable_key A <code>PP_Bool</code> indicating if + * a new usable key has been added. + */ + void SessionKeysChange( + [in] PP_Instance instance, + [in] PP_Var web_session_id, + [in] PP_Bool has_additional_usable_key); + + /** + * The expiration time for a session has changed. + * + * @param[in] web_session_id A <code>PP_Var</code> of type + * <code>PP_VARTYPE_STRING</code> containing the ID of the session that has + * a new expiration time. + * + * @param[in] new_expiry_time A <code>PP_Time</code> indicating the new + * expiry time of the session. The value is defined as the number of seconds + * since the Epoch (00:00:00 UTC, January 1, 1970). + */ + void SessionExpirationChange( + [in] PP_Instance instance, + [in] PP_Var web_session_id, + [in] PP_Time new_expiry_time); + + /** * The session is now ready to decrypt the media stream. * * Note: The above describes the most simple case. Depending on the key diff --git a/ppapi/api/private/ppp_content_decryptor_private.idl b/ppapi/api/private/ppp_content_decryptor_private.idl index 73a5225..46fc701 100644 --- a/ppapi/api/private/ppp_content_decryptor_private.idl +++ b/ppapi/api/private/ppp_content_decryptor_private.idl @@ -31,6 +31,21 @@ interface PPP_ContentDecryptor_Private { [in] PP_Var key_system); /** + * Provides a server certificate to be used to encrypt messages to the + * license server. + * + * @param[in] promise_id A reference for the promise that gets resolved or + * rejected depending upon the success or failure of setting the certificate. + * + * @param[in] server_certificate A <code>PP_Var</code> of type + * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the certificate to be used. + */ + void SetServerCertificate( + [in] PP_Instance instance, + [in] uint32_t promise_id, + [in] PP_Var server_certificate); + + /** * Creates a session. <code>init_data_type</code> contains the MIME type of * <code>init_data</code>. <code>init_data</code> is a data buffer * containing data for use in generating the request. @@ -108,17 +123,51 @@ interface PPP_ContentDecryptor_Private { [in] PP_Var response); /** - * Release the specified session and related resources. + * Close the specified session and related resources. + * + * @param[in] promise_id A reference for the promise that gets resolved or + * rejected depending upon the success or failure of closing the session. + * + * @param[in] web_session_id A <code>PP_Var</code> of type + * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session + * to be closed. + * + */ + void CloseSession( + [in] PP_Instance instance, + [in] uint32_t promise_id, + [in] PP_Var web_session_id); + + /** + * Remove stored data associated with this session. + * + * @param[in] promise_id A reference for the promise that gets resolved or + * rejected depending upon the success or failure of removing the session + * data. + * + * @param[in] web_session_id A <code>PP_Var</code> of type + * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session + * to be removed. + * + */ + void RemoveSession( + [in] PP_Instance instance, + [in] uint32_t promise_id, + [in] PP_Var web_session_id); + + /** + * Get the key IDs for keys in the session that the CDM knows are currently + * usable to decrypt media data. * * @param[in] promise_id A reference for the promise that gets resolved or - * rejected depending upon the success or failure of releasing the session. + * rejected depending upon the success or failure of obtaining the key IDs. * * @param[in] web_session_id A <code>PP_Var</code> of type * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session - * to be released. + * to be queried. * */ - void ReleaseSession( + void GetUsableKeyIds( [in] PP_Instance instance, [in] uint32_t promise_id, [in] PP_Var web_session_id); |