Chromium Code Reviews| 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 M24 = 0.6 | 12 M31 = 0.7 |
| 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 v0.1 of the proposed Encrypted Media Extensions: | 19 * Decryption Module (CDM) for v0.1 of the proposed Encrypted Media Extensions: |
| 20 * http://goo.gl/rbdnR | 20 * http://goo.gl/rbdnR |
| 21 */ | 21 */ |
| 22 interface PPP_ContentDecryptor_Private { | 22 interface PPP_ContentDecryptor_Private { |
| 23 /** | 23 /** |
| 24 * Initialize for the specified key system. | |
| 25 * | |
| 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. | |
| 28 * | |
| 29 * @param[in] key_system_flags A <code>PP_KeySystemFlags</code> that | |
| 30 * contains additional information on <code>key_system</code>. | |
|
ddorwin
2013/09/18 21:26:53
contains configuration information.
or something
jrummell
2013/09/19 00:37:28
Done.
| |
| 31 */ | |
| 32 void Initialize( | |
| 33 [in] PP_Instance instance, | |
| 34 [in] PP_Var key_system, | |
| 35 [in] PP_KeySystemFlags key_system_flags); | |
|
dmichael (off chromium)
2013/09/18 22:52:32
Do you expect there to be a lot of these? I don't
jrummell
2013/09/19 00:37:28
Switched to a bool.
| |
| 36 | |
| 37 /** | |
| 24 * Generates a key request. key_system specifies the key or licensing system | 38 * Generates a key request. key_system specifies the key or licensing system |
| 25 * to use. type contains the MIME type of init_data. init_data is a data | 39 * to use. type contains the MIME type of init_data. init_data is a data |
| 26 * buffer containing data for use in generating the request. | 40 * buffer containing data for use in generating the request. |
| 27 * | 41 * |
| 28 * Note: <code>GenerateKeyRequest()</code> must create the session ID used in | 42 * Note: <code>GenerateKeyRequest()</code> must create the session ID used in |
| 29 * other methods on this interface. The session ID must be provided to the | 43 * other methods on this interface. The session ID must be provided to the |
| 30 * browser by the CDM via <code>KeyMessage()</code> on the | 44 * browser by the CDM via <code>KeyMessage()</code> on the |
| 31 * <code>PPB_ContentDecryptor_Private</code> interface. | 45 * <code>PPB_ContentDecryptor_Private</code> interface. |
| 32 * | 46 * |
| 33 * @param[in] key_system A <code>PP_Var</code> of type | |
| 34 * <code>PP_VARTYPE_STRING</code> containing the name of the key system. | |
| 35 * | |
| 36 * @param[in] type A <code>PP_Var</code> of type | 47 * @param[in] type A <code>PP_Var</code> of type |
| 37 * <code>PP_VARTYPE_STRING</code> containing the MIME type for init_data. | 48 * <code>PP_VARTYPE_STRING</code> containing the MIME type for init_data. |
| 38 * | 49 * |
| 39 * @param[in] init_data A <code>PP_Var</code> of type | 50 * @param[in] init_data A <code>PP_Var</code> of type |
| 40 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific | 51 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific |
| 41 * initialization data. | 52 * initialization data. |
| 42 */ | 53 */ |
| 43 void GenerateKeyRequest( | 54 void GenerateKeyRequest( |
| 44 [in] PP_Instance instance, | 55 [in] PP_Instance instance, |
| 45 [in] PP_Var key_system, | |
| 46 [in] PP_Var type, | 56 [in] PP_Var type, |
| 47 [in] PP_Var init_data); | 57 [in] PP_Var init_data); |
| 48 | 58 |
| 49 /** | 59 /** |
| 50 * Provides a key or license to the decryptor for decrypting media data. | 60 * Provides a key or license to the decryptor for decrypting media data. |
| 51 * | 61 * |
| 52 * When the CDM needs more information to complete addition of the key it | 62 * When the CDM needs more information to complete addition of the key it |
| 53 * will call <code>KeyMessage()</code> on the | 63 * will call <code>KeyMessage()</code> on the |
| 54 * <code>PPB_ContentDecryptor_Private</code> interface, which the browser | 64 * <code>PPB_ContentDecryptor_Private</code> interface, which the browser |
| 55 * passes to the application. When the key is ready to use, the CDM | 65 * passes to the application. When the key is ready to use, the CDM |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 209 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that | 219 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that |
| 210 * contains all auxiliary information needed for decryption of the | 220 * contains all auxiliary information needed for decryption of the |
| 211 * <code>encrypted_block</code>. | 221 * <code>encrypted_block</code>. |
| 212 */ | 222 */ |
| 213 void DecryptAndDecode( | 223 void DecryptAndDecode( |
| 214 [in] PP_Instance instance, | 224 [in] PP_Instance instance, |
| 215 [in] PP_DecryptorStreamType decoder_type, | 225 [in] PP_DecryptorStreamType decoder_type, |
| 216 [in] PP_Resource encrypted_buffer, | 226 [in] PP_Resource encrypted_buffer, |
| 217 [in] PP_EncryptedBlockInfo encrypted_block_info); | 227 [in] PP_EncryptedBlockInfo encrypted_block_info); |
| 218 }; | 228 }; |
| OLD | NEW |