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

Side by Side Diff: ppapi/api/private/ppp_content_decryptor_private.idl

Issue 265993002: Add Promises for EME (Chromium side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more trybot issue Created 6 years, 6 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 /** 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.11 12 M36 = 0.12
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>content_type</code> contains the MIME type of 34 * Creates a session. <code>init_data_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 a web session ID and provide 38 * Note: <code>CreateSession()</code> must create a web session ID and provide
39 * it to the browser via <code>SessionCreated()</code> on the 39 * it to the browser via <code>SessionCreated()</code> on the
40 * <code>PPB_ContentDecryptor_Private</code> interface. 40 * <code>PPB_ContentDecryptor_Private</code> interface.
41 * 41 *
42 * @param[in] session_id A reference for the session for which a session 42 * @param[in] promise_id A reference for the promise that gets resolved or
43 * should be generated. 43 * rejected depending upon the success or failure when creating the session.
44 * 44 *
45 * @param[in] content_type A <code>PP_Var</code> of type 45 * @param[in] init_data_type A <code>PP_Var</code> of type
46 * <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.
47 * 47 *
48 * @param[in] init_data A <code>PP_Var</code> of type 48 * @param[in] init_data A <code>PP_Var</code> of type
49 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific 49 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing container specific
50 * initialization data. 50 * initialization data.
51 *
52 * @param[in] session_type A <code>PP_SessionType</code> that indicates the
53 * type of session to be created.
51 */ 54 */
52 void CreateSession( 55 void CreateSession(
53 [in] PP_Instance instance, 56 [in] PP_Instance instance,
54 [in] uint32_t session_id, 57 [in] uint32_t promise_id,
55 [in] PP_Var content_type, 58 [in] PP_Var init_data_type,
56 [in] PP_Var init_data); 59 [in] PP_Var init_data,
60 [in] PP_SessionType session_type);
57 61
58 /** 62 /**
59 * Loads a session whose web session ID is <code>web_session_id</code>. 63 * Loads a session whose web session ID is <code>web_session_id</code>.
60 * 64 *
61 * Note: After the session is successfully loaded, the CDM must call 65 * Note: After the session is successfully loaded, the CDM must call
62 * <code>SessionCreated()</code> with <code>web_session_id</code> on the 66 * <code>SessionCreated()</code> with <code>web_session_id</code> on the
63 * <code>PPB_ContentDecryptor_Private</code> interface. 67 * <code>PPB_ContentDecryptor_Private</code> interface.
64 * 68 *
65 * @param[in] session_id A reference for the session for which a session 69 * @param[in] promise_id A reference for the promise that gets resolved or
66 * should be loaded. 70 * rejected depending upon the success or failure of loading the session.
67 * 71 *
68 * @param[in] web_session_id A <code>PP_Var</code> of type 72 * @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 73 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session
70 * to load. 74 * to load.
71 */ 75 */
72 void LoadSession( 76 void LoadSession(
73 [in] PP_Instance instance, 77 [in] PP_Instance instance,
74 [in] uint32_t session_id, 78 [in] uint32_t promise_id,
75 [in] PP_Var web_session_id); 79 [in] PP_Var web_session_id);
76 80
77 /** 81 /**
78 * Provides a license or other message to the decryptor. 82 * Provides a license or other message to the decryptor.
79 * 83 *
80 * When the CDM needs more information, it must call 84 * When the CDM needs more information, it must call
81 * <code>SessionMessage()</code> on the 85 * <code>SessionMessage()</code> on the
82 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser 86 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser
83 * must notify the web application. When the CDM has finished processing 87 * must notify the web application. When the CDM has finished processing
84 * <code>response</code> and needs no more information, it must call 88 * <code>response</code> and needs no more information, it must call
85 * <code>SessionReady()</code> on the 89 * <code>SessionReady()</code> on the
86 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser 90 * <code>PPB_ContentDecryptor_Private</code> interface, and the browser
87 * must notify the web application. 91 * must notify the web application.
88 * 92 *
89 * @param[in] session_id A reference for the session to update. 93 * @param[in] promise_id A reference for the promise that gets resolved or
94 * rejected depending upon the success or failure of updating the session.
95 *
96 * @param[in] web_session_id A <code>PP_Var</code> of type
97 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session
98 * to be updated.
90 * 99 *
91 * @param[in] response A <code>PP_Var</code> of type 100 * @param[in] response A <code>PP_Var</code> of type
92 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the license or other 101 * <code>PP_VARTYPE_ARRAYBUFFER</code> containing the license or other
93 * message for the given session ID. 102 * message for the given session ID.
94 */ 103 */
95 void UpdateSession( 104 void UpdateSession(
96 [in] PP_Instance instance, 105 [in] PP_Instance instance,
97 [in] uint32_t session_id, 106 [in] uint32_t promise_id,
107 [in] PP_Var web_session_id,
98 [in] PP_Var response); 108 [in] PP_Var response);
99 109
100 /** 110 /**
101 * Release the specified session and related resources. 111 * Release the specified session and related resources.
102 * 112 *
103 * @param[in] session_id A reference for the session that should be 113 * @param[in] promise_id A reference for the promise that gets resolved or
104 * released. 114 * rejected depending upon the success or failure of releasing the session.
115 *
116 * @param[in] web_session_id A <code>PP_Var</code> of type
117 * <code>PP_VARTYPE_STRING</code> containing the web session ID of the session
118 * to be released.
119 *
105 */ 120 */
106 void ReleaseSession( 121 void ReleaseSession(
107 [in] PP_Instance instance, 122 [in] PP_Instance instance,
108 [in] uint32_t session_id); 123 [in] uint32_t promise_id,
124 [in] PP_Var web_session_id);
109 125
110 /** 126 /**
111 * Decrypts the block and returns the unencrypted block via 127 * Decrypts the block and returns the unencrypted block via
112 * <code>DeliverBlock()</code> on the 128 * <code>DeliverBlock()</code> on the
113 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block 129 * <code>PPB_ContentDecryptor_Private</code> interface. The returned block
114 * contains encoded data. 130 * contains encoded data.
115 * 131 *
116 * @param[in] resource A <code>PP_Resource</code> corresponding to a 132 * @param[in] resource A <code>PP_Resource</code> corresponding to a
117 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data 133 * <code>PPB_Buffer_Dev</code> resource that contains an encrypted data
118 * block. 134 * block.
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that 248 * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that
233 * contains all auxiliary information needed for decryption of the 249 * contains all auxiliary information needed for decryption of the
234 * <code>encrypted_block</code>. 250 * <code>encrypted_block</code>.
235 */ 251 */
236 void DecryptAndDecode( 252 void DecryptAndDecode(
237 [in] PP_Instance instance, 253 [in] PP_Instance instance,
238 [in] PP_DecryptorStreamType decoder_type, 254 [in] PP_DecryptorStreamType decoder_type,
239 [in] PP_Resource encrypted_buffer, 255 [in] PP_Resource encrypted_buffer,
240 [in] PP_EncryptedBlockInfo encrypted_block_info); 256 [in] PP_EncryptedBlockInfo encrypted_block_info);
241 }; 257 };
OLDNEW
« no previous file with comments | « ppapi/api/private/ppb_content_decryptor_private.idl ('k') | ppapi/c/private/pp_content_decryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698