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/c/private | |
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/c/private')
-rw-r--r-- | ppapi/c/private/ppb_content_decryptor_private.h | 48 | ||||
-rw-r--r-- | ppapi/c/private/ppp_content_decryptor_private.h | 57 |
2 files changed, 94 insertions, 11 deletions
diff --git a/ppapi/c/private/ppb_content_decryptor_private.h b/ppapi/c/private/ppb_content_decryptor_private.h index c65c9f8..5665806 100644 --- a/ppapi/c/private/ppb_content_decryptor_private.h +++ b/ppapi/c/private/ppb_content_decryptor_private.h @@ -4,7 +4,7 @@ */ /* From private/ppb_content_decryptor_private.idl, - * modified Thu Jun 5 13:39:15 2014. + * modified Mon Aug 25 13:52:39 2014. */ #ifndef PPAPI_C_PRIVATE_PPB_CONTENT_DECRYPTOR_PRIVATE_H_ @@ -15,6 +15,7 @@ #include "ppapi/c/pp_macros.h" #include "ppapi/c/pp_resource.h" #include "ppapi/c/pp_stdint.h" +#include "ppapi/c/pp_time.h" #include "ppapi/c/pp_var.h" #include "ppapi/c/private/pp_content_decryptor.h" @@ -50,7 +51,7 @@ struct PPB_ContentDecryptor_Private_0_12 { */ void (*PromiseResolved)(PP_Instance instance, 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. * @@ -61,6 +62,18 @@ struct PPB_ContentDecryptor_Private_0_12 { uint32_t promise_id, struct 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)(PP_Instance instance, + uint32_t promise_id, + struct 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. @@ -93,8 +106,8 @@ struct PPB_ContentDecryptor_Private_0_12 { * 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. @@ -108,6 +121,33 @@ struct PPB_ContentDecryptor_Private_0_12 { struct PP_Var message, struct 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)(PP_Instance instance, + struct PP_Var web_session_id, + 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)(PP_Instance instance, + struct PP_Var web_session_id, + 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/c/private/ppp_content_decryptor_private.h b/ppapi/c/private/ppp_content_decryptor_private.h index 3470005..145d843 100644 --- a/ppapi/c/private/ppp_content_decryptor_private.h +++ b/ppapi/c/private/ppp_content_decryptor_private.h @@ -4,7 +4,7 @@ */ /* From private/ppp_content_decryptor_private.idl, - * modified Thu May 1 10:36:31 2014. + * modified Mon Aug 25 14:02:40 2014. */ #ifndef PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ @@ -51,6 +51,19 @@ struct PPP_ContentDecryptor_Private_0_12 { */ void (*Initialize)(PP_Instance instance, struct 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)(PP_Instance instance, + uint32_t promise_id, + struct 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. @@ -122,19 +135,49 @@ struct PPP_ContentDecryptor_Private_0_12 { struct PP_Var web_session_id, struct 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)(PP_Instance instance, + uint32_t promise_id, + struct 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)(PP_Instance instance, + uint32_t promise_id, + struct 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)(PP_Instance instance, - uint32_t promise_id, - struct PP_Var web_session_id); + void (*GetUsableKeyIds)(PP_Instance instance, + uint32_t promise_id, + struct PP_Var web_session_id); /** * Decrypts the block and returns the unencrypted block via * <code>DeliverBlock()</code> on the |