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

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

Issue 649603004: Non-SFI NaCl: Batch-open resource files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ipc/ and mojo/ changes following Mark's suggestion 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 /* This file contains NaCl private interfaces. This interface is not versioned 6 /* This file contains NaCl private interfaces. This interface is not versioned
7 * and is for internal Chrome use. It may change without notice. */ 7 * and is for internal Chrome use. It may change without notice. */
8 8
9 label Chrome { 9 label Chrome {
10 M25 = 1.0 10 M25 = 1.0
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 struct PP_PNaClOptions { 147 struct PP_PNaClOptions {
148 PP_Bool translate; 148 PP_Bool translate;
149 PP_Bool is_debug; 149 PP_Bool is_debug;
150 int32_t opt_level; 150 int32_t opt_level;
151 }; 151 };
152 152
153 /* Callback invoked upon completion of PPP_ManifestService::OpenResource(). */ 153 /* Callback invoked upon completion of PPP_ManifestService::OpenResource(). */
154 typedef void PP_OpenResourceCompletionCallback([inout] mem_t user_data, 154 typedef void PP_OpenResourceCompletionCallback([inout] mem_t user_data,
155 [in] PP_FileHandle file_handle); 155 [in] PP_FileHandle file_handle);
156 156
157 /* Corresponds to NaClFileInfo in 157 /* Corresponds to NaClFileInfo in native_client/src/public/nacl_file_info.h */
158 * native_client/src/trusted/validator/nacl_file_info.h */
159 struct PP_NaClFileInfo { 158 struct PP_NaClFileInfo {
160 PP_FileHandle handle; 159 PP_FileHandle handle;
161 160
162 /* See NaClFileToken comment in nacl_file_info.h */ 161 /* See NaClFileToken comment in nacl_file_info.h */
163 uint64_t token_lo; 162 uint64_t token_lo;
164 uint64_t token_hi; 163 uint64_t token_hi;
165 }; 164 };
166 165
166 struct PP_NaClResourceFileHandle {
167 PP_FileHandle handle;
168
169 /* See NaClFileToken comment in nacl_file_info.h */
170 uint64_t token_lo;
171 uint64_t token_hi;
172
173 str_t key;
hidehiko 2015/01/28 09:05:20 Could you add a comment about the memory managemen
Yusuke Sato 2015/02/04 02:00:29 Done.
174 };
175
167 /* PPB_NaCl_Private */ 176 /* PPB_NaCl_Private */
168 interface PPB_NaCl_Private { 177 interface PPB_NaCl_Private {
169 /* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success 178 /* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success
170 * and writes a NaClHandle to imc_handle. Returns PP_EXTERNAL_PLUGIN_FAILED on 179 * and writes a NaClHandle to imc_handle. Returns PP_EXTERNAL_PLUGIN_FAILED on
171 * failure. The |enable_ppapi_dev| parameter controls whether GetInterface 180 * failure. The |enable_ppapi_dev| parameter controls whether GetInterface
172 * returns 'Dev' interfaces to the NaCl plugin. 181 * returns 'Dev' interfaces to the NaCl plugin.
173 * The |nexe_file_info| is currently used only in non-SFI mode. It is the 182 * The |nexe_file_info| is currently used only in non-SFI mode. It is the
174 * file handle for the main nexe file, which should be initially loaded. 183 * file handle for the main nexe file, which should be initially loaded.
175 * LaunchSelLdr takes the ownership of the file handle. 184 * LaunchSelLdr takes the ownership of the file handle.
176 * The |uses_nonsfi_mode| flag indicates whether or not nonsfi-mode should 185 * The |uses_nonsfi_mode| flag indicates whether or not nonsfi-mode should
177 * be used with the binary pointed by the url. 186 * be used with the binary pointed by the url.
178 */ 187 */
179 void LaunchSelLdr([in] PP_Instance instance, 188 void LaunchSelLdr([in] PP_Instance instance,
180 [in] PP_Bool main_service_runtime, 189 [in] PP_Bool main_service_runtime,
181 [in] str_t alleged_url, 190 [in] str_t alleged_url,
182 [in] PP_NaClFileInfo nexe_file_info, 191 [in] PP_NaClFileInfo nexe_file_info,
192 [in] PP_NaClResourceFileHandle[] resource_file_handles,
Mark Seaborn 2015/02/02 23:21:51 If I understand this correctly, DownloadNexe() ret
Yusuke Sato 2015/02/05 07:21:13 Done.
193 [in] uint32_t resource_file_handles_len,
183 [in] PP_Bool uses_nonsfi_mode, 194 [in] PP_Bool uses_nonsfi_mode,
184 [in] PP_Bool enable_ppapi_dev, 195 [in] PP_Bool enable_ppapi_dev,
185 [in] PP_NaClAppProcessType process_type, 196 [in] PP_NaClAppProcessType process_type,
186 [out] mem_t imc_handle, 197 [out] mem_t imc_handle,
187 [in] PP_CompletionCallback callback); 198 [in] PP_CompletionCallback callback);
188 199
189 /* This function starts the IPC proxy so the nexe can communicate with the 200 /* This function starts the IPC proxy so the nexe can communicate with the
190 * browser. 201 * browser.
191 */ 202 */
192 PP_Bool StartPpapiProxy(PP_Instance instance); 203 PP_Bool StartPpapiProxy(PP_Instance instance);
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 // http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr 347 // http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr
337 PP_Var GetCpuFeatureAttrs(); 348 PP_Var GetCpuFeatureAttrs();
338 349
339 /* Downloads the .nexe file at the given URL to a file, and sets |file_info| 350 /* Downloads the .nexe file at the given URL to a file, and sets |file_info|
340 * to information for a handle to a file containing its contents. 351 * to information for a handle to a file containing its contents.
341 * If metadata for identity-based validation caching is available 352 * If metadata for identity-based validation caching is available
342 * then it sets token information in |file_info| (otherwise left untouched). 353 * then it sets token information in |file_info| (otherwise left untouched).
343 */ 354 */
344 void DownloadNexe([in] PP_Instance instance, 355 void DownloadNexe([in] PP_Instance instance,
345 [in] str_t url, 356 [in] str_t url,
357 [in] PP_Bool download_resource_files,
346 [out] PP_NaClFileInfo file_info, 358 [out] PP_NaClFileInfo file_info,
359 [out] PP_NaClResourceFileHandle[] resource_file_handles,
360 [out] uint32_t resource_file_handles_len,
347 [in] PP_CompletionCallback callback); 361 [in] PP_CompletionCallback callback);
348 362
349 /* Reports the status of sel_ldr for UMA reporting. 363 /* Reports the status of sel_ldr for UMA reporting.
350 * |max_status| has to be provided because the implementation of this 364 * |max_status| has to be provided because the implementation of this
351 * interface can't access the NaClErrorCode enum. 365 * interface can't access the NaClErrorCode enum.
352 */ 366 */
353 void ReportSelLdrStatus([in] PP_Instance instance, 367 void ReportSelLdrStatus([in] PP_Instance instance,
354 [in] int32_t load_status, 368 [in] int32_t load_status,
355 [in] int32_t max_status); 369 [in] int32_t max_status);
356 370
(...skipping 26 matching lines...) Expand all
383 * Otherwise, |stream_callback| is called repeatedly with blocks of data 397 * Otherwise, |stream_callback| is called repeatedly with blocks of data
384 * as they are received. |stream_finished_callback| is called after all 398 * as they are received. |stream_finished_callback| is called after all
385 * data has been received and dispatched to |stream_callback|. 399 * data has been received and dispatched to |stream_callback|.
386 */ 400 */
387 void StreamPexe([in] PP_Instance instance, 401 void StreamPexe([in] PP_Instance instance,
388 [in] str_t pexe_url, 402 [in] str_t pexe_url,
389 [in] int32_t opt_level, 403 [in] int32_t opt_level,
390 [in] PPP_PexeStreamHandler stream_handler, 404 [in] PPP_PexeStreamHandler stream_handler,
391 [inout] mem_t stream_handler_user_data); 405 [inout] mem_t stream_handler_user_data);
392 }; 406 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698