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

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

Issue 131653003: Support LoadSession() in MediaKeys and PPP_ContentDecryptor_Private interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 6 years, 10 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 | Annotate | Revision Log
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 Wed Jan 8 16:02:29 2014. 7 * modified Mon Feb 10 13:23:32 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_10 \ 21 #define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_11 \
22 "PPP_ContentDecryptor_Private;0.10" 22 "PPP_ContentDecryptor_Private;0.11"
23 #define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE \ 23 #define PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE \
24 PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_10 24 PPP_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_11
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_10 { 45 struct PPP_ContentDecryptor_Private_0_11 {
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 * Creates a session. <code>type</code> contains the MIME type of 54 * Creates a session. <code>content_type</code> contains the MIME type of
55 * <code>init_data</code>. <code>init_data</code> is a data buffer 55 * <code>init_data</code>. <code>init_data</code> is a data buffer
56 * containing data for use in generating the request. 56 * containing data for use in generating the request.
57 * 57 *
58 * Note: <code>CreateSession()</code> must create the session ID used in 58 * Note: <code>CreateSession()</code> must create a web session ID and provide
59 * other methods on this interface. The session ID must be provided to the 59 * it to the browser via <code>SessionCreated()</code> on the
60 * browser by the CDM via <code>SessionCreated()</code> on the
61 * <code>PPB_ContentDecryptor_Private</code> interface. 60 * <code>PPB_ContentDecryptor_Private</code> interface.
62 * 61 *
63 * @param[in] session_id A reference for the session for which a session 62 * @param[in] session_id A reference for the session for which a session
64 * should be generated. 63 * should be generated.
65 * 64 *
66 * @param[in] type A <code>PP_Var</code> of type 65 * @param[in] content_type A <code>PP_Var</code> of type
67 * <code>PP_VARTYPE_STRING</code> containing the MIME type for init_data. 66 * <code>PP_VARTYPE_STRING</code> containing the MIME type for init_data.
68 * 67 *
69 * @param[in] init_data A <code>PP_Var</code> of type 68 * @param[in] init_data A <code>PP_Var</code> of type
70 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific 69 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific
71 * initialization data. 70 * initialization data.
72 */ 71 */
73 void (*CreateSession)(PP_Instance instance, 72 void (*CreateSession)(PP_Instance instance,
74 uint32_t session_id, 73 uint32_t session_id,
75 struct PP_Var type, 74 struct PP_Var content_type,
76 struct PP_Var init_data); 75 struct PP_Var init_data);
77 /** 76 /**
77 * Loads a session whose web session ID is <code>web_session_id</code>.
78 *
79 * Note: After the session is successfully loaded, the CDM must call
80 * <code>SessionCreated()</code> with <code>web_session_id</code> on the
81 * <code>PPB_ContentDecryptor_Private</code> interface.
82 *
83 * @param[in] session_id A reference for the session for which a session
84 * should be loaded.
85 *
86 * @param[in] web_session_id A <code>PP_Var</code> of type
87 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session
88 * to load.
89 */
90 void (*LoadSession)(PP_Instance instance,
91 uint32_t session_id,
92 struct PP_Var web_session_id);
93 /**
78 * Provides a license or other message to the decryptor. 94 * Provides a license or other message to the decryptor.
79 * 95 *
80 * When the CDM needs more information, it must call 96 * When the CDM needs more information, it must call
81 * <code>SessionMessage()</code> on the 97 * <code>SessionMessage()</code> on the
82 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser 98 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser
83 * must notify the web application. When the CDM has finished processing 99 * must notify the web application. When the CDM has finished processing
84 * <code>response</code> and needs no more information, it must call 100 * <code>response</code> and needs no more information, it must call
85 * <code>SessionReady()</code> on the 101 * <code>SessionReady()</code> on the
86 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser 102 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser
87 * must notify the web application. 103 * must notify the web application.
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 * contains all auxiliary information needed for decryption of the 237 * contains all auxiliary information needed for decryption of the
222 * <code>encrypted_block</code>. 238 * <code>encrypted_block</code>.
223 */ 239 */
224 void (*DecryptAndDecode)( 240 void (*DecryptAndDecode)(
225 PP_Instance instance, 241 PP_Instance instance,
226 PP_DecryptorStreamType decoder_type, 242 PP_DecryptorStreamType decoder_type,
227 PP_Resource encrypted_buffer, 243 PP_Resource encrypted_buffer,
228 const struct PP_EncryptedBlockInfo* encrypted_block_info); 244 const struct PP_EncryptedBlockInfo* encrypted_block_info);
229 }; 245 };
230 246
231 typedef struct PPP_ContentDecryptor_Private_0_10 PPP_ContentDecryptor_Private; 247 typedef struct PPP_ContentDecryptor_Private_0_11 PPP_ContentDecryptor_Private;
232 /** 248 /**
233 * @} 249 * @}
234 */ 250 */
235 251
236 #endif /* PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ */ 252 #endif /* PPAPI_C_PRIVATE_PPP_CONTENT_DECRYPTOR_PRIVATE_H_ */
237 253
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698