| 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 M34 = 0.10 | 12 M34 = 0.11 |
| 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 { |
| 23 /** | 23 /** |
| 24 * Initialize for the specified key system. | 24 * Initialize for the specified key system. |
| 25 * | 25 * |
| 26 * @param[in] key_system A <code>PP_Var</code> of type | 26 * @param[in] key_system A <code>PP_Var</code> of type |
| 27 * <code>PP_VARTYPE_STRING</code> containing the name of the key system. | 27 * <code>PP_VARTYPE_STRING</code> containing the name of the key system. |
| 28 */ | 28 */ |
| 29 void Initialize( | 29 void Initialize( |
| 30 [in] PP_Instance instance, | 30 [in] PP_Instance instance, |
| 31 [in] PP_Var key_system); | 31 [in] PP_Var key_system); |
| 32 | 32 |
| 33 /** | 33 /** |
| 34 * Creates a session. <code>type</code> contains the MIME type of | 34 * Creates a session. <code>content_type</code> contains the MIME type of |
| 35 * <code>init_data</code>. <code>init_data</code> is a data buffer | 35 * <code>init_data</code>. <code>init_data</code> is a data buffer |
| 36 * containing data for use in generating the request. | 36 * containing data for use in generating the request. |
| 37 * | 37 * |
| 38 * Note: <code>CreateSession()</code> must create the session ID used in | 38 * Note: <code>CreateSession()</code> must create a web session ID and provide |
| 39 * other methods on this interface. The session ID must be provided to the | 39 * it to the browser via <code>SessionCreated()</code> on the |
| 40 * browser by the CDM via <code>SessionCreated()</code> on the | |
| 41 * <code>PPB_ContentDecryptor_Private</code> interface. | 40 * <code>PPB_ContentDecryptor_Private</code> interface. |
| 42 * | 41 * |
| 43 * @param[in] session_id A reference for the session for which a session | 42 * @param[in] session_id A reference for the session for which a session |
| 44 * should be generated. | 43 * should be generated. |
| 45 * | 44 * |
| 46 * @param[in] type A <code>PP_Var</code> of type | 45 * @param[in] content_type A <code>PP_Var</code> of type |
| 47 * <code>PP_VARTYPE_STRING</code> containing the MIME type for init_data. | 46 * <code>PP_VARTYPE_STRING</code> containing the MIME type for init_data. |
| 48 * | 47 * |
| 49 * @param[in] init_data A <code>PP_Var</code> of type | 48 * @param[in] init_data A <code>PP_Var</code> of type |
| 50 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific | 49 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific |
| 51 * initialization data. | 50 * initialization data. |
| 52 */ | 51 */ |
| 53 void CreateSession( | 52 void CreateSession( |
| 54 [in] PP_Instance instance, | 53 [in] PP_Instance instance, |
| 55 [in] uint32_t session_id, | 54 [in] uint32_t session_id, |
| 56 [in] PP_Var type, | 55 [in] PP_Var content_type, |
| 57 [in] PP_Var init_data); | 56 [in] PP_Var init_data); |
| 58 | 57 |
| 59 /** | 58 /** |
| 59 * Loads a session whose web session ID is <code>web_session_id</code>. |
| 60 * |
| 61 * Note: After the session is successfully loaded, the CDM must call |
| 62 * <code>SessionCreated()</code> with <code>web_session_id</code> on the |
| 63 * <code>PPB_ContentDecryptor_Private</code> interface. |
| 64 * |
| 65 * @param[in] session_id A reference for the session for which a session |
| 66 * should be loaded. |
| 67 * |
| 68 * @param[in] web_session_id A <code>PP_Var</code> of type |
| 69 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session |
| 70 * to load. |
| 71 */ |
| 72 void LoadSession( |
| 73 [in] PP_Instance instance, |
| 74 [in] uint32_t session_id, |
| 75 [in] PP_Var web_session_id); |
| 76 |
| 77 /** |
| 60 * Provides a license or other message to the decryptor. | 78 * Provides a license or other message to the decryptor. |
| 61 * | 79 * |
| 62 * When the CDM needs more information, it must call | 80 * When the CDM needs more information, it must call |
| 63 * <code>SessionMessage()</code> on the | 81 * <code>SessionMessage()</code> on the |
| 64 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser | 82 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser |
| 65 * must notify the web application. When the CDM has finished processing | 83 * must notify the web application. When the CDM has finished processing |
| 66 * <code>response</code> and needs no more information, it must call | 84 * <code>response</code> and needs no more information, it must call |
| 67 * <code>SessionReady()</code> on the | 85 * <code>SessionReady()</code> on the |
| 68 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser | 86 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser |
| 69 * must notify the web application. | 87 * must notify the web application. |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that | 232 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that |
| 215 * contains all auxiliary information needed for decryption of the | 233 * contains all auxiliary information needed for decryption of the |
| 216 * <code>encrypted_block</code>. | 234 * <code>encrypted_block</code>. |
| 217 */ | 235 */ |
| 218 void DecryptAndDecode( | 236 void DecryptAndDecode( |
| 219 [in] PP_Instance instance, | 237 [in] PP_Instance instance, |
| 220 [in] PP_DecryptorStreamType decoder_type, | 238 [in] PP_DecryptorStreamType decoder_type, |
| 221 [in] PP_Resource encrypted_buffer, | 239 [in] PP_Resource encrypted_buffer, |
| 222 [in] PP_EncryptedBlockInfo encrypted_block_info); | 240 [in] PP_EncryptedBlockInfo encrypted_block_info); |
| 223 }; | 241 }; |
| OLD | NEW |