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

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

Issue 811923002: Changes to support CDM_7 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cdm_7 changes Created 6 years 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 Mon Aug 25 14:02:40 2014. 7 * modified Fri Dec 12 13:44:41 2014.
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_12 \ 21 #define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_13 \
22 "PPP_ContentDecryptor_Private;0.12" 22 "PPP_ContentDecryptor_Private;0.13"
23 #define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE \ 23 #define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE \
24 PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_12 24 PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_13
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 Encrypted Media Extensions: 42 * Decryption Module (CDM) for Encrypted Media Extensions:
43 * http://www.w3.org/TR/encrypted-media/ 43 * http://www.w3.org/TR/encrypted-media/
44 */ 44 */
45 struct PPP_ContentDecryptor_Private_0_12 { 45 struct PPP_ContentDecryptor_Private_0_13 {
46 /** 46 /**
47 * Initialize for the specified key system. 47 * Initialize for the specified key system.
48 * 48 *
49 * @param[in] key_system A <code>PP_Var</code> of type 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. 50 * <code>PP_VARTYPE_STRING</code> containing the name of the key system.
51 */ 51 */
52 void (*Initialize)(PP_Instance instance, struct PP_Var key_system); 52 void (*Initialize)(PP_Instance instance, struct PP_Var key_system);
53 /** 53 /**
54 * Provides a server certificate to be used to encrypt messages to the 54 * Provides a server certificate to be used to encrypt messages to the
55 * license server. 55 * license server.
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 of setting the certificate. 58 * rejected depending upon the success or failure of setting the certificate.
59 * 59 *
60 * @param[in] server_certificate A <code>PP_Var</code> of type 60 * @param[in] server_certificate A <code>PP_Var</code> of type
61 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the certificate to be used. 61 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the certificate to be used.
62 */ 62 */
63 void (*SetServerCertificate)(PP_Instance instance, 63 void (*SetServerCertificate)(PP_Instance instance,
64 uint32_t promise_id, 64 uint32_t promise_id,
65 struct PP_Var server_certificate); 65 struct PP_Var server_certificate);
66 /** 66 /**
67 * Creates a session. <code>init_data_type</code> contains the MIME type of 67 * Creates a session. <code>init_data_type</code> contains the MIME type of
68 * <code>init_data</code>. <code>init_data</code> is a data buffer 68 * <code>init_data</code>. <code>init_data</code> is a data buffer
69 * containing data for use in generating the request. 69 * containing data for use in generating the request.
70 * 70 *
71 * Note: <code>CreateSession()</code> must create a web session ID and provide 71 * Note: <code>CreateSessionAndGenerateRequest()</code> must create a web
72 * it to the browser via <code>SessionCreated()</code> on the 72 * session ID and provide it to the browser via <code>SessionCreated()</code>
73 * <code>PPB_ContentDecryptor_Private</code> interface. 73 * on the <code>PPB_ContentDecryptor_Private</code> interface.
74 * 74 *
75 * @param[in] promise_id A reference for the promise that gets resolved or 75 * @param[in] promise_id A reference for the promise that gets resolved or
76 * rejected depending upon the success or failure when creating the session. 76 * rejected depending upon the success or failure when creating the session.
77 * 77 *
78 * @param[in] session_type A <code>PP_SessionType</code> that indicates the
79 * type of session to be created.
80 *
78 * @param[in] init_data_type A <code>PP_Var</code> of type 81 * @param[in] init_data_type A <code>PP_Var</code> of type
79 * <code>PP_VARTYPE_STRING</code> containing the MIME type for init_data. 82 * <code>PP_VARTYPE_STRING</code> containing the MIME type for init_data.
80 * 83 *
81 * @param[in] init_data A <code>PP_Var</code> of type 84 * @param[in] init_data A <code>PP_Var</code> of type
82 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific 85 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific
83 * initialization data. 86 * initialization data.
84 *
85 * @param[in] session_type A <code>PP_SessionType</code> that indicates the
86 * type of session to be created.
87 */ 87 */
88 void (*CreateSession)(PP_Instance instance, 88 void (*CreateSessionAndGenerateRequest)(PP_Instance instance,
89 uint32_t promise_id, 89 uint32_t promise_id,
90 struct PP_Var init_data_type, 90 PP_SessionType session_type,
91 struct PP_Var init_data, 91 struct PP_Var init_data_type,
92 PP_SessionType session_type); 92 struct PP_Var init_data);
93 /** 93 /**
94 * Loads a session whose web session ID is <code>web_session_id</code>. 94 * Loads a session whose web session ID is <code>web_session_id</code>.
95 * 95 *
96 * Note: After the session is successfully loaded, the CDM must call 96 * Note: After the session is successfully loaded, the CDM must call
97 * <code>SessionCreated()</code> with <code>web_session_id</code> on the 97 * <code>SessionCreated()</code> with <code>web_session_id</code> on the
98 * <code>PPB_ContentDecryptor_Private</code> interface. 98 * <code>PPB_ContentDecryptor_Private</code> interface.
99 * 99 *
100 * @param[in] promise_id A reference for the promise that gets resolved or 100 * @param[in] promise_id A reference for the promise that gets resolved or
101 * rejected depending upon the success or failure of loading the session. 101 * rejected depending upon the success or failure of loading the session.
102 * 102 *
103 * @param[in] session_type A <code>PP_SessionType</code> that indicates the
104 * type of session to be loaded.
105 *
103 * @param[in] web_session_id A <code>PP_Var</code> of type 106 * @param[in] web_session_id A <code>PP_Var</code> of type
104 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session 107 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session
105 * to load. 108 * to load.
106 */ 109 */
107 void (*LoadSession)(PP_Instance instance, 110 void (*LoadSession)(PP_Instance instance,
108 uint32_t promise_id, 111 uint32_t promise_id,
112 PP_SessionType session_type,
109 struct PP_Var web_session_id); 113 struct PP_Var web_session_id);
110 /** 114 /**
111 * Provides a license or other message to the decryptor. 115 * Provides a license or other message to the decryptor.
112 * 116 *
113 * When the CDM needs more information, it must call 117 * When the CDM needs more information, it must call
114 * <code>SessionMessage()</code> on the 118 * <code>SessionMessage()</code> on the
115 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser 119 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser
116 * must notify the web application. When the CDM has finished processing 120 * must notify the web application. When the CDM has finished processing
117 * <code>response</code> and needs no more information, it must call 121 * <code>response</code> and needs no more information, it must call
118 * <code>SessionReady()</code> on the 122 * <code>SessionReady()</code> on the
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 * 161 *
158 * @param[in] web_session_id A <code>PP_Var</code> of type 162 * @param[in] web_session_id A <code>PP_Var</code> of type
159 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session 163 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session
160 * to be removed. 164 * to be removed.
161 * 165 *
162 */ 166 */
163 void (*RemoveSession)(PP_Instance instance, 167 void (*RemoveSession)(PP_Instance instance,
164 uint32_t promise_id, 168 uint32_t promise_id,
165 struct PP_Var web_session_id); 169 struct PP_Var web_session_id);
166 /** 170 /**
167 * Get the key IDs for keys in the session that the CDM knows are currently
168 * usable to decrypt media data.
169 *
170 * @param[in] promise_id A reference for the promise that gets resolved or
171 * rejected depending upon the success or failure of obtaining the key IDs.
172 *
173 * @param[in] web_session_id A <code>PP_Var</code> of type
174 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session
175 * to be queried.
176 *
177 */
178 void (*GetUsableKeyIds)(PP_Instance instance,
179 uint32_t promise_id,
180 struct PP_Var web_session_id);
181 /**
182 * Decrypts the block and returns the unencrypted block via 171 * Decrypts the block and returns the unencrypted block via
183 * <code>DeliverBlock()</code> on the 172 * <code>DeliverBlock()</code> on the
184 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block 173 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block
185 * contains encoded data. 174 * contains encoded data.
186 * 175 *
187 * @param[in] resource A <code>PP_Resource</code> corresponding to a 176 * @param[in] resource A <code>PP_Resource</code> corresponding to a
188 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data 177 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data
189 * block. 178 * block.
190 * 179 *
191 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that 180 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 * contains all auxiliary information needed for decryption of the 286 * contains all auxiliary information needed for decryption of the
298 * <code>encrypted_block</code>. 287 * <code>encrypted_block</code>.
299 */ 288 */
300 void (*DecryptAndDecode)( 289 void (*DecryptAndDecode)(
301 PP_Instance instance, 290 PP_Instance instance,
302 PP_DecryptorStreamType decoder_type, 291 PP_DecryptorStreamType decoder_type,
303 PP_Resource encrypted_buffer, 292 PP_Resource encrypted_buffer,
304 const struct PP_EncryptedBlockInfo* encrypted_block_info); 293 const struct PP_EncryptedBlockInfo* encrypted_block_info);
305 }; 294 };
306 295
307 typedef struct PPP_ContentDecryptor_Private_0_12 PPP_ContentDecryptor_Private; 296 typedef struct PPP_ContentDecryptor_Private_0_13 PPP_ContentDecryptor_Private;
308 /** 297 /**
309 * @} 298 * @}
310 */ 299 */
311 300
312 #endif /* PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ */ 301 #endif /* PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ */
313 302
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698