OLD | NEW |
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 Tue May 13 11:00:06 2014. */ | 6 /* From private/ppb_nacl_private.idl modified Wed May 14 09:54:36 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 uint64_t* file_token_hi); | 319 uint64_t* file_token_hi); |
320 /* Dispatch a progress event on the DOM element where the given instance is | 320 /* Dispatch a progress event on the DOM element where the given instance is |
321 * embedded. | 321 * embedded. |
322 */ | 322 */ |
323 void (*DispatchEvent)(PP_Instance instance, | 323 void (*DispatchEvent)(PP_Instance instance, |
324 PP_NaClEventType event_type, | 324 PP_NaClEventType event_type, |
325 const char* resource_url, | 325 const char* resource_url, |
326 PP_Bool length_is_computable, | 326 PP_Bool length_is_computable, |
327 uint64_t loaded_bytes, | 327 uint64_t loaded_bytes, |
328 uint64_t total_bytes); | 328 uint64_t total_bytes); |
329 /* Report that the attempt to open the nexe has finished. Opening the file | |
330 * may have failed, as indicated by a pp_error value that is not PP_OK or an | |
331 * fd of -1. Failure to stat the file to determine its length results in | |
332 * nexe_bytes_read being -1. | |
333 */ | |
334 void (*NexeFileDidOpen)(PP_Instance instance, | |
335 int32_t pp_error, | |
336 int32_t fd, | |
337 int32_t http_status, | |
338 int64_t nexe_bytes_read, | |
339 const char* url, | |
340 int64_t time_since_open); | |
341 /* Report that the nexe loaded successfully. */ | 329 /* Report that the nexe loaded successfully. */ |
342 void (*ReportLoadSuccess)(PP_Instance instance, | 330 void (*ReportLoadSuccess)(PP_Instance instance, |
343 const char* url, | 331 const char* url, |
344 uint64_t loaded_bytes, | 332 uint64_t loaded_bytes, |
345 uint64_t total_bytes); | 333 uint64_t total_bytes); |
346 /* Report an error that occured while attempting to load a nexe. */ | 334 /* Report an error that occured while attempting to load a nexe. */ |
347 void (*ReportLoadError)(PP_Instance instance, | 335 void (*ReportLoadError)(PP_Instance instance, |
348 PP_NaClError error, | 336 PP_NaClError error, |
349 const char* error_message, | 337 const char* error_message, |
350 const char* console_message); | 338 const char* console_message); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 struct PP_Var* ld_tool_name); | 418 struct PP_Var* ld_tool_name); |
431 /* PP_Var string of attributes describing the CPU features supported | 419 /* PP_Var string of attributes describing the CPU features supported |
432 * by the current architecture. The string is a comma-delimited list | 420 * by the current architecture. The string is a comma-delimited list |
433 * of attributes supported by LLVM in its -mattr= option: | 421 * of attributes supported by LLVM in its -mattr= option: |
434 * http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr */ | 422 * http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr */ |
435 struct PP_Var (*GetCpuFeatureAttrs)(void); | 423 struct PP_Var (*GetCpuFeatureAttrs)(void); |
436 /* Posts a message to the JavaScript object for the given instance. | 424 /* Posts a message to the JavaScript object for the given instance. |
437 * This method may be called on any thread. | 425 * This method may be called on any thread. |
438 */ | 426 */ |
439 void (*PostMessageToJavaScript)(PP_Instance instance, const char* message); | 427 void (*PostMessageToJavaScript)(PP_Instance instance, const char* message); |
| 428 /* Downloads the .nexe file at the given URL to a file, and populates |
| 429 * |handle| with a handle to a file containing its contents. */ |
| 430 void (*DownloadNexe)(PP_Instance instance, |
| 431 const char* url, |
| 432 PP_FileHandle* handle, |
| 433 struct PP_CompletionCallback callback); |
440 }; | 434 }; |
441 | 435 |
442 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; | 436 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; |
443 /** | 437 /** |
444 * @} | 438 * @} |
445 */ | 439 */ |
446 | 440 |
447 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ | 441 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ |
448 | 442 |
OLD | NEW |