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

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

Issue 649603004: Non-SFI NaCl: Batch-open resource files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review Created 6 years, 2 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/ppb_nacl_private.idl modified Wed Oct 1 15:54:15 2014. */ 6 /* From private/ppb_nacl_private.idl modified Tue Oct 21 15:38:37 2014. */
7 7
8 #ifndef PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ 8 #ifndef PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_
9 #define PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ 9 #define PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_
10 10
11 #include "ppapi/c/pp_bool.h" 11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_completion_callback.h" 12 #include "ppapi/c/pp_completion_callback.h"
13 #include "ppapi/c/pp_instance.h" 13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/pp_macros.h" 14 #include "ppapi/c/pp_macros.h"
15 #include "ppapi/c/pp_stdint.h" 15 #include "ppapi/c/pp_stdint.h"
16 #include "ppapi/c/pp_var.h" 16 #include "ppapi/c/pp_var.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 typedef void (*PP_OpenResourceCompletionCallback)(void* user_data, 184 typedef void (*PP_OpenResourceCompletionCallback)(void* user_data,
185 PP_FileHandle file_handle); 185 PP_FileHandle file_handle);
186 /** 186 /**
187 * @} 187 * @}
188 */ 188 */
189 189
190 /** 190 /**
191 * @addtogroup Structs 191 * @addtogroup Structs
192 * @{ 192 * @{
193 */ 193 */
194 /* Corresponds to NaClFileInfo in 194 /* Corresponds to NaClFileInfo in native_client/src/public/nacl_file_info.h */
195 * native_client/src/trusted/validator/nacl_file_info.h */
196 struct PP_NaClFileInfo { 195 struct PP_NaClFileInfo {
197 PP_FileHandle handle; 196 PP_FileHandle handle;
198 /* See NaClFileToken comment in nacl_file_info.h */ 197 /* See NaClFileToken comment in nacl_file_info.h */
199 uint64_t token_lo; 198 uint64_t token_lo;
200 uint64_t token_hi; 199 uint64_t token_hi;
201 }; 200 };
201
202 struct PP_NaClResourceFileHandle {
203 PP_FileHandle handle;
204 /* See NaClFileToken comment in nacl_file_info.h */
205 uint64_t token_lo;
206 uint64_t token_hi;
207 char* key;
208 };
202 /** 209 /**
203 * @} 210 * @}
204 */ 211 */
205 212
206 /** 213 /**
207 * @addtogroup Interfaces 214 * @addtogroup Interfaces
208 * @{ 215 * @{
209 */ 216 */
210 /* PPB_NaCl_Private */ 217 /* PPB_NaCl_Private */
211 struct PPB_NaCl_Private_1_0 { 218 struct PPB_NaCl_Private_1_0 {
212 /* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success 219 /* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success
213 * and writes a NaClHandle to imc_handle. Returns PP_EXTERNAL_PLUGIN_FAILED on 220 * and writes a NaClHandle to imc_handle. Returns PP_EXTERNAL_PLUGIN_FAILED on
214 * failure. The |enable_ppapi_dev| parameter controls whether GetInterface 221 * failure. The |enable_ppapi_dev| parameter controls whether GetInterface
215 * returns 'Dev' interfaces to the NaCl plugin. 222 * returns 'Dev' interfaces to the NaCl plugin.
216 * The |nexe_file_info| is currently used only in non-SFI mode. It is the 223 * The |nexe_file_info| is currently used only in non-SFI mode. It is the
217 * file handle for the main nexe file, which should be initially loaded. 224 * file handle for the main nexe file, which should be initially loaded.
218 * LaunchSelLdr takes the ownership of the file handle. 225 * LaunchSelLdr takes the ownership of the file handle.
219 * The |uses_nonsfi_mode| flag indicates whether or not nonsfi-mode should 226 * The |uses_nonsfi_mode| flag indicates whether or not nonsfi-mode should
220 * be used with the binary pointed by the url. 227 * be used with the binary pointed by the url.
221 */ 228 */
222 void (*LaunchSelLdr)(PP_Instance instance, 229 void (*LaunchSelLdr)(
223 PP_Bool main_service_runtime, 230 PP_Instance instance,
224 const char* alleged_url, 231 PP_Bool main_service_runtime,
225 const struct PP_NaClFileInfo* nexe_file_info, 232 const char* alleged_url,
226 PP_Bool uses_nonsfi_mode, 233 const struct PP_NaClFileInfo* nexe_file_info,
227 PP_Bool enable_ppapi_dev, 234 const struct PP_NaClResourceFileHandle resource_file_handles[],
228 PP_NaClAppProcessType process_type, 235 PP_Bool uses_nonsfi_mode,
229 void* imc_handle, 236 PP_Bool enable_ppapi_dev,
230 struct PP_CompletionCallback callback); 237 PP_NaClAppProcessType process_type,
238 void* imc_handle,
239 struct PP_CompletionCallback callback);
231 /* This function starts the IPC proxy so the nexe can communicate with the 240 /* This function starts the IPC proxy so the nexe can communicate with the
232 * browser. 241 * browser.
233 */ 242 */
234 PP_Bool (*StartPpapiProxy)(PP_Instance instance); 243 PP_Bool (*StartPpapiProxy)(PP_Instance instance);
235 /* On POSIX systems, this function returns the file descriptor of 244 /* On POSIX systems, this function returns the file descriptor of
236 * /dev/urandom. On non-POSIX systems, this function returns 0. 245 * /dev/urandom. On non-POSIX systems, this function returns 0.
237 */ 246 */
238 int32_t (*UrandomFD)(void); 247 int32_t (*UrandomFD)(void);
239 /* Whether the Pepper 3D interfaces should be disabled in the NaCl PPAPI 248 /* Whether the Pepper 3D interfaces should be disabled in the NaCl PPAPI
240 * proxy. This is so paranoid admins can effectively prevent untrusted shader 249 * proxy. This is so paranoid admins can effectively prevent untrusted shader
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 /* PP_Var string of attributes describing the CPU features supported 354 /* PP_Var string of attributes describing the CPU features supported
346 * by the current architecture. The string is a comma-delimited list 355 * by the current architecture. The string is a comma-delimited list
347 * of attributes supported by LLVM in its -mattr= option: 356 * of attributes supported by LLVM in its -mattr= option:
348 * http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr */ 357 * http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr */
349 struct PP_Var (*GetCpuFeatureAttrs)(void); 358 struct PP_Var (*GetCpuFeatureAttrs)(void);
350 /* Downloads the .nexe file at the given URL to a file, and sets |file_info| 359 /* Downloads the .nexe file at the given URL to a file, and sets |file_info|
351 * to information for a handle to a file containing its contents. 360 * to information for a handle to a file containing its contents.
352 * If metadata for identity-based validation caching is available 361 * If metadata for identity-based validation caching is available
353 * then it sets token information in |file_info| (otherwise left untouched). 362 * then it sets token information in |file_info| (otherwise left untouched).
354 */ 363 */
355 void (*DownloadNexe)(PP_Instance instance, 364 void (*DownloadNexe)(
356 const char* url, 365 PP_Instance instance,
357 struct PP_NaClFileInfo* file_info, 366 const char* url,
358 struct PP_CompletionCallback callback); 367 PP_Bool download_resource_files,
368 struct PP_NaClFileInfo* file_info,
369 struct PP_NaClResourceFileHandle** resource_file_handles,
370 struct PP_CompletionCallback callback);
359 /* Reports the status of sel_ldr for UMA reporting. 371 /* Reports the status of sel_ldr for UMA reporting.
360 * |max_status| has to be provided because the implementation of this 372 * |max_status| has to be provided because the implementation of this
361 * interface can't access the NaClErrorCode enum. 373 * interface can't access the NaClErrorCode enum.
362 */ 374 */
363 void (*ReportSelLdrStatus)(PP_Instance instance, 375 void (*ReportSelLdrStatus)(PP_Instance instance,
364 int32_t load_status, 376 int32_t load_status,
365 int32_t max_status); 377 int32_t max_status);
366 /* Logs time taken by an operation to UMA histograms. 378 /* Logs time taken by an operation to UMA histograms.
367 * This function is safe to call on any thread. 379 * This function is safe to call on any thread.
368 */ 380 */
(...skipping 27 matching lines...) Expand all
396 void* stream_handler_user_data); 408 void* stream_handler_user_data);
397 }; 409 };
398 410
399 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; 411 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private;
400 /** 412 /**
401 * @} 413 * @}
402 */ 414 */
403 415
404 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ 416 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */
405 417
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698