Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: ppapi/c/private/ppp_content_decryptor_private.h

Issue 24192004: Changes to the EME Pepper API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 /* From private/ppp_content_decryptor_private.idl, 6 /* From private/ppp_content_decryptor_private.idl,
7 * modified Fri Oct 26 15:36:54 2012. 7 * modified Wed Sep 18 16:14:30 2013.
8 */ 8 */
9 9
10 #ifndef PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ 10 #ifndef PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_
11 #define PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ 11 #define PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_
12 12
13 #include "ppapi/c/pp_bool.h" 13 #include "ppapi/c/pp_bool.h"
14 #include "ppapi/c/pp_instance.h" 14 #include "ppapi/c/pp_instance.h"
15 #include "ppapi/c/pp_macros.h" 15 #include "ppapi/c/pp_macros.h"
16 #include "ppapi/c/pp_resource.h" 16 #include "ppapi/c/pp_resource.h"
17 #include "ppapi/c/pp_stdint.h" 17 #include "ppapi/c/pp_stdint.h"
18 #include "ppapi/c/pp_var.h" 18 #include "ppapi/c/pp_var.h"
19 #include "ppapi/c/private/pp_content_decryptor.h" 19 #include "ppapi/c/private/pp_content_decryptor.h"
20 20
21 #define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_6 \ 21 #define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_7 \
22 "PPP_ContentDecryptor_Private;0.6" 22 "PPP_ContentDecryptor_Private;0.7"
23 #define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE \ 23 #define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE \
24 PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_6 24 PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_7
25 25
26 /** 26 /**
27 * @file 27 * @file
28 * This file defines the <code>PPP_ContentDecryptor_Private</code> 28 * This file defines the <code>PPP_ContentDecryptor_Private</code>
29 * interface. Note: This is a special interface, only to be used for Content 29 * interface. Note: This is a special interface, only to be used for Content
30 * Decryption Modules, not normal plugins. 30 * Decryption Modules, not normal plugins.
31 */ 31 */
32 32
33 33
34 /** 34 /**
35 * @addtogroup Interfaces 35 * @addtogroup Interfaces
36 * @{ 36 * @{
37 */ 37 */
38 /** 38 /**
39 * <code>PPP_ContentDecryptor_Private</code> structure contains the function 39 * <code>PPP_ContentDecryptor_Private</code> structure contains the function
40 * pointers the decryption plugin must implement to provide services needed by 40 * pointers the decryption plugin must implement to provide services needed by
41 * the browser. This interface provides the plugin side support for the Content 41 * the browser. This interface provides the plugin side support for the Content
42 * Decryption Module (CDM) for v0.1 of the proposed Encrypted Media Extensions: 42 * Decryption Module (CDM) for v0.1 of the proposed Encrypted Media Extensions:
43 * http://goo.gl/rbdnR 43 * http://goo.gl/rbdnR
44 */ 44 */
45 struct PPP_ContentDecryptor_Private_0_6 { 45 struct PPP_ContentDecryptor_Private_0_7 {
46 /**
47 * Initialize for the specified key system.
48 *
49 * @param[in] key_system A <code>PP_Var</code> of type
50 * <code>PP_VARTYPE_STRING</code> containing the name of the key system.
51 *
52 * @param[in] can_challenge_platform A <code>PP_Bool</code> that
53 * indicates if the underlying host platform can be challenged;
54 * i.e., verified as a trusted platform.
55 */
56 void (*Initialize)(PP_Instance instance,
57 struct PP_Var key_system,
58 PP_Bool can_challenge_platform);
46 /** 59 /**
47 * Generates a key request. key_system specifies the key or licensing system 60 * Generates a key request. key_system specifies the key or licensing system
48 * to use. type contains the MIME type of init_data. init_data is a data 61 * to use. type contains the MIME type of init_data. init_data is a data
49 * buffer containing data for use in generating the request. 62 * buffer containing data for use in generating the request.
50 * 63 *
51 * Note: <code>GenerateKeyRequest()</code> must create the session ID used in 64 * Note: <code>GenerateKeyRequest()</code> must create the session ID used in
52 * other methods on this interface. The session ID must be provided to the 65 * other methods on this interface. The session ID must be provided to the
53 * browser by the CDM via <code>KeyMessage()</code> on the 66 * browser by the CDM via <code>KeyMessage()</code> on the
54 * <code>PPB_ContentDecryptor_Private</code> interface. 67 * <code>PPB_ContentDecryptor_Private</code> interface.
55 * 68 *
56 * @param[in] key_system A <code>PP_Var</code> of type
57 * <code>PP_VARTYPE_STRING</code> containing the name of the key system.
58 *
59 * @param[in] type A <code>PP_Var</code> of type 69 * @param[in] type A <code>PP_Var</code> of type
60 * <code>PP_VARTYPE_STRING</code> containing the MIME type for init_data. 70 * <code>PP_VARTYPE_STRING</code> containing the MIME type for init_data.
61 * 71 *
62 * @param[in] init_data A <code>PP_Var</code> of type 72 * @param[in] init_data A <code>PP_Var</code> of type
63 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific 73 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific
64 * initialization data. 74 * initialization data.
65 */ 75 */
66 void (*GenerateKeyRequest)(PP_Instance instance, 76 void (*GenerateKeyRequest)(PP_Instance instance,
67 struct PP_Var key_system,
68 struct PP_Var type, 77 struct PP_Var type,
69 struct PP_Var init_data); 78 struct PP_Var init_data);
70 /** 79 /**
71 * Provides a key or license to the decryptor for decrypting media data. 80 * Provides a key or license to the decryptor for decrypting media data.
72 * 81 *
73 * When the CDM needs more information to complete addition of the key it 82 * When the CDM needs more information to complete addition of the key it
74 * will call <code>KeyMessage()</code> on the 83 * will call <code>KeyMessage()</code> on the
75 * <code>PPB_ContentDecryptor_Private</code> interface, which the browser 84 * <code>PPB_ContentDecryptor_Private</code> interface, which the browser
76 * passes to the application. When the key is ready to use, the CDM 85 * passes to the application. When the key is ready to use, the CDM
77 * must call call <code>KeyAdded()</code> on the 86 * must call call <code>KeyAdded()</code> on the
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 * contains all auxiliary information needed for decryption of the 228 * contains all auxiliary information needed for decryption of the
220 * <code>encrypted_block</code>. 229 * <code>encrypted_block</code>.
221 */ 230 */
222 void (*DecryptAndDecode)( 231 void (*DecryptAndDecode)(
223 PP_Instance instance, 232 PP_Instance instance,
224 PP_DecryptorStreamType decoder_type, 233 PP_DecryptorStreamType decoder_type,
225 PP_Resource encrypted_buffer, 234 PP_Resource encrypted_buffer,
226 const struct PP_EncryptedBlockInfo* encrypted_block_info); 235 const struct PP_EncryptedBlockInfo* encrypted_block_info);
227 }; 236 };
228 237
229 typedef struct PPP_ContentDecryptor_Private_0_6 PPP_ContentDecryptor_Private; 238 typedef struct PPP_ContentDecryptor_Private_0_7 PPP_ContentDecryptor_Private;
230 /** 239 /**
231 * @} 240 * @}
232 */ 241 */
233 242
234 #endif /* PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ */ 243 #endif /* PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ */
235 244
OLDNEW
« no previous file with comments | « ppapi/c/private/ppb_content_decryptor_private.h ('k') | ppapi/cpp/private/content_decryptor_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698