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

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: 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 /* From private/ppb_nacl_private.idl modified Wed Oct 1 15:54:15 2014. */ 6 /* From private/ppb_nacl_private.idl modified Mon Nov 3 17:52:33 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 uint32_t resource_file_handles_len,
229 void* imc_handle, 236 PP_Bool uses_nonsfi_mode,
230 struct PP_CompletionCallback callback); 237 PP_Bool enable_ppapi_dev,
238 PP_NaClAppProcessType process_type,
239 void* imc_handle,
240 struct PP_CompletionCallback callback);
231 /* This function starts the IPC proxy so the nexe can communicate with the 241 /* This function starts the IPC proxy so the nexe can communicate with the
232 * browser. 242 * browser.
233 */ 243 */
234 PP_Bool (*StartPpapiProxy)(PP_Instance instance); 244 PP_Bool (*StartPpapiProxy)(PP_Instance instance);
235 /* On POSIX systems, this function returns the file descriptor of 245 /* On POSIX systems, this function returns the file descriptor of
236 * /dev/urandom. On non-POSIX systems, this function returns 0. 246 * /dev/urandom. On non-POSIX systems, this function returns 0.
237 */ 247 */
238 int32_t (*UrandomFD)(void); 248 int32_t (*UrandomFD)(void);
239 /* Whether the Pepper 3D interfaces should be disabled in the NaCl PPAPI 249 /* Whether the Pepper 3D interfaces should be disabled in the NaCl PPAPI
240 * proxy. This is so paranoid admins can effectively prevent untrusted shader 250 * 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 355 /* PP_Var string of attributes describing the CPU features supported
346 * by the current architecture. The string is a comma-delimited list 356 * by the current architecture. The string is a comma-delimited list
347 * of attributes supported by LLVM in its -mattr= option: 357 * of attributes supported by LLVM in its -mattr= option:
348 * http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr */ 358 * http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr */
349 struct PP_Var (*GetCpuFeatureAttrs)(void); 359 struct PP_Var (*GetCpuFeatureAttrs)(void);
350 /* Downloads the .nexe file at the given URL to a file, and sets |file_info| 360 /* 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. 361 * to information for a handle to a file containing its contents.
352 * If metadata for identity-based validation caching is available 362 * If metadata for identity-based validation caching is available
353 * then it sets token information in |file_info| (otherwise left untouched). 363 * then it sets token information in |file_info| (otherwise left untouched).
354 */ 364 */
355 void (*DownloadNexe)(PP_Instance instance, 365 void (*DownloadNexe)(
356 const char* url, 366 PP_Instance instance,
357 struct PP_NaClFileInfo* file_info, 367 const char* url,
358 struct PP_CompletionCallback callback); 368 PP_Bool download_resource_files,
369 struct PP_NaClFileInfo* file_info,
370 struct PP_NaClResourceFileHandle** resource_file_handles,
371 uint32_t* resource_file_handles_len,
372 struct PP_CompletionCallback callback);
359 /* Reports the status of sel_ldr for UMA reporting. 373 /* Reports the status of sel_ldr for UMA reporting.
360 * |max_status| has to be provided because the implementation of this 374 * |max_status| has to be provided because the implementation of this
361 * interface can't access the NaClErrorCode enum. 375 * interface can't access the NaClErrorCode enum.
362 */ 376 */
363 void (*ReportSelLdrStatus)(PP_Instance instance, 377 void (*ReportSelLdrStatus)(PP_Instance instance,
364 int32_t load_status, 378 int32_t load_status,
365 int32_t max_status); 379 int32_t max_status);
366 /* Logs time taken by an operation to UMA histograms. 380 /* Logs time taken by an operation to UMA histograms.
367 * This function is safe to call on any thread. 381 * This function is safe to call on any thread.
368 */ 382 */
(...skipping 27 matching lines...) Expand all
396 void* stream_handler_user_data); 410 void* stream_handler_user_data);
397 }; 411 };
398 412
399 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; 413 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private;
400 /** 414 /**
401 * @} 415 * @}
402 */ 416 */
403 417
404 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ 418 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */
405 419
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698