| OLD | NEW |
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 | 5 |
| 6 /** | 6 /** |
| 7 * This file defines the <code>PPP_ContentDecryptor_Private</code> | 7 * This file defines the <code>PPP_ContentDecryptor_Private</code> |
| 8 * interface. Note: This is a special interface, only to be used for Content | 8 * interface. Note: This is a special interface, only to be used for Content |
| 9 * Decryption Modules, not normal plugins. | 9 * Decryption Modules, not normal plugins. |
| 10 */ | 10 */ |
| 11 label Chrome { | 11 label Chrome { |
| 12 M36 = 0.12 | 12 M41 = 0.13 |
| 13 }; | 13 }; |
| 14 | 14 |
| 15 /** | 15 /** |
| 16 * <code>PPP_ContentDecryptor_Private</code> structure contains the function | 16 * <code>PPP_ContentDecryptor_Private</code> structure contains the function |
| 17 * pointers the decryption plugin must implement to provide services needed by | 17 * pointers the decryption plugin must implement to provide services needed by |
| 18 * the browser. This interface provides the plugin side support for the Content | 18 * the browser. This interface provides the plugin side support for the Content |
| 19 * Decryption Module (CDM) for Encrypted Media Extensions: | 19 * Decryption Module (CDM) for Encrypted Media Extensions: |
| 20 * http://www.w3.org/TR/encrypted-media/ | 20 * http://www.w3.org/TR/encrypted-media/ |
| 21 */ | 21 */ |
| 22 interface PPP_ContentDecryptor_Private { | 22 interface PPP_ContentDecryptor_Private { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 43 void SetServerCertificate( | 43 void SetServerCertificate( |
| 44 [in] PP_Instance instance, | 44 [in] PP_Instance instance, |
| 45 [in] uint32_t promise_id, | 45 [in] uint32_t promise_id, |
| 46 [in] PP_Var server_certificate); | 46 [in] PP_Var server_certificate); |
| 47 | 47 |
| 48 /** | 48 /** |
| 49 * Creates a session. <code>init_data_type</code> contains the MIME type of | 49 * Creates a session. <code>init_data_type</code> contains the MIME type of |
| 50 * <code>init_data</code>. <code>init_data</code> is a data buffer | 50 * <code>init_data</code>. <code>init_data</code> is a data buffer |
| 51 * containing data for use in generating the request. | 51 * containing data for use in generating the request. |
| 52 * | 52 * |
| 53 * Note: <code>CreateSession()</code> must create a web session ID and provide | 53 * Note: <code>CreateSessionAndGenerateRequest()</code> must create a web |
| 54 * it to the browser via <code>SessionCreated()</code> on the | 54 * session ID and provide it to the browser via <code>SessionCreated()</code> |
| 55 * <code>PPB_ContentDecryptor_Private</code> interface. | 55 * on the <code>PPB_ContentDecryptor_Private</code> interface. |
| 56 * | 56 * |
| 57 * @param[in] promise_id A reference for the promise that gets resolved or | 57 * @param[in] promise_id A reference for the promise that gets resolved or |
| 58 * rejected depending upon the success or failure when creating the session. | 58 * rejected depending upon the success or failure when creating the session. |
| 59 * | 59 * |
| 60 * @param[in] session_type A <code>PP_SessionType</code> that indicates the |
| 61 * type of session to be created. |
| 62 * |
| 60 * @param[in] init_data_type A <code>PP_Var</code> of type | 63 * @param[in] init_data_type A <code>PP_Var</code> of type |
| 61 * <code>PP_VARTYPE_STRING</code> containing the MIME type for init_data. | 64 * <code>PP_VARTYPE_STRING</code> containing the MIME type for init_data. |
| 62 * | 65 * |
| 63 * @param[in] init_data A <code>PP_Var</code> of type | 66 * @param[in] init_data A <code>PP_Var</code> of type |
| 64 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific | 67 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific |
| 65 * initialization data. | 68 * initialization data. |
| 66 * | |
| 67 * @param[in] session_type A <code>PP_SessionType</code> that indicates the | |
| 68 * type of session to be created. | |
| 69 */ | 69 */ |
| 70 void CreateSession( | 70 void CreateSessionAndGenerateRequest( |
| 71 [in] PP_Instance instance, | 71 [in] PP_Instance instance, |
| 72 [in] uint32_t promise_id, | 72 [in] uint32_t promise_id, |
| 73 [in] PP_SessionType session_type, |
| 73 [in] PP_Var init_data_type, | 74 [in] PP_Var init_data_type, |
| 74 [in] PP_Var init_data, | 75 [in] PP_Var init_data); |
| 75 [in] PP_SessionType session_type); | |
| 76 | 76 |
| 77 /** | 77 /** |
| 78 * Loads a session whose web session ID is <code>web_session_id</code>. | 78 * Loads a session whose web session ID is <code>web_session_id</code>. |
| 79 * | 79 * |
| 80 * Note: After the session is successfully loaded, the CDM must call | 80 * Note: After the session is successfully loaded, the CDM must call |
| 81 * <code>SessionCreated()</code> with <code>web_session_id</code> on the | 81 * <code>SessionCreated()</code> with <code>web_session_id</code> on the |
| 82 * <code>PPB_ContentDecryptor_Private</code> interface. | 82 * <code>PPB_ContentDecryptor_Private</code> interface. |
| 83 * | 83 * |
| 84 * @param[in] promise_id A reference for the promise that gets resolved or | 84 * @param[in] promise_id A reference for the promise that gets resolved or |
| 85 * rejected depending upon the success or failure of loading the session. | 85 * rejected depending upon the success or failure of loading the session. |
| 86 * | 86 * |
| 87 * @param[in] session_type A <code>PP_SessionType</code> that indicates the |
| 88 * type of session to be loaded. |
| 89 * |
| 87 * @param[in] web_session_id A <code>PP_Var</code> of type | 90 * @param[in] web_session_id A <code>PP_Var</code> of type |
| 88 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session | 91 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session |
| 89 * to load. | 92 * to load. |
| 90 */ | 93 */ |
| 91 void LoadSession( | 94 void LoadSession( |
| 92 [in] PP_Instance instance, | 95 [in] PP_Instance instance, |
| 93 [in] uint32_t promise_id, | 96 [in] uint32_t promise_id, |
| 97 [in] PP_SessionType session_type, |
| 94 [in] PP_Var web_session_id); | 98 [in] PP_Var web_session_id); |
| 95 | 99 |
| 96 /** | 100 /** |
| 97 * Provides a license or other message to the decryptor. | 101 * Provides a license or other message to the decryptor. |
| 98 * | 102 * |
| 99 * When the CDM needs more information, it must call | 103 * When the CDM needs more information, it must call |
| 100 * <code>SessionMessage()</code> on the | 104 * <code>SessionMessage()</code> on the |
| 101 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser | 105 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser |
| 102 * must notify the web application. When the CDM has finished processing | 106 * must notify the web application. When the CDM has finished processing |
| 103 * <code>response</code> and needs no more information, it must call | 107 * <code>response</code> and needs no more information, it must call |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session | 153 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session |
| 150 * to be removed. | 154 * to be removed. |
| 151 * | 155 * |
| 152 */ | 156 */ |
| 153 void RemoveSession( | 157 void RemoveSession( |
| 154 [in] PP_Instance instance, | 158 [in] PP_Instance instance, |
| 155 [in] uint32_t promise_id, | 159 [in] uint32_t promise_id, |
| 156 [in] PP_Var web_session_id); | 160 [in] PP_Var web_session_id); |
| 157 | 161 |
| 158 /** | 162 /** |
| 159 * Get the key IDs for keys in the session that the CDM knows are currently | |
| 160 * usable to decrypt media data. | |
| 161 * | |
| 162 * @param[in] promise_id A reference for the promise that gets resolved or | |
| 163 * rejected depending upon the success or failure of obtaining the key IDs. | |
| 164 * | |
| 165 * @param[in] web_session_id A <code>PP_Var</code> of type | |
| 166 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session | |
| 167 * to be queried. | |
| 168 * | |
| 169 */ | |
| 170 void GetUsableKeyIds( | |
| 171 [in] PP_Instance instance, | |
| 172 [in] uint32_t promise_id, | |
| 173 [in] PP_Var web_session_id); | |
| 174 | |
| 175 /** | |
| 176 * Decrypts the block and returns the unencrypted block via | 163 * Decrypts the block and returns the unencrypted block via |
| 177 * <code>DeliverBlock()</code> on the | 164 * <code>DeliverBlock()</code> on the |
| 178 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block | 165 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block |
| 179 * contains encoded data. | 166 * contains encoded data. |
| 180 * | 167 * |
| 181 * @param[in] resource A <code>PP_Resource</code> corresponding to a | 168 * @param[in] resource A <code>PP_Resource</code> corresponding to a |
| 182 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data | 169 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data |
| 183 * block. | 170 * block. |
| 184 * | 171 * |
| 185 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that | 172 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that | 284 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that |
| 298 * contains all auxiliary information needed for decryption of the | 285 * contains all auxiliary information needed for decryption of the |
| 299 * <code>encrypted_block</code>. | 286 * <code>encrypted_block</code>. |
| 300 */ | 287 */ |
| 301 void DecryptAndDecode( | 288 void DecryptAndDecode( |
| 302 [in] PP_Instance instance, | 289 [in] PP_Instance instance, |
| 303 [in] PP_DecryptorStreamType decoder_type, | 290 [in] PP_DecryptorStreamType decoder_type, |
| 304 [in] PP_Resource encrypted_buffer, | 291 [in] PP_Resource encrypted_buffer, |
| 305 [in] PP_EncryptedBlockInfo encrypted_block_info); | 292 [in] PP_EncryptedBlockInfo encrypted_block_info); |
| 306 }; | 293 }; |
| OLD | NEW |