| 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 Wed May 14 11:49:42 2014. */ | 6 /* From private/ppb_nacl_private.idl modified Fri May 16 11:43:13 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 struct PP_Var* ld_tool_name); | 411 struct PP_Var* ld_tool_name); |
| 424 /* PP_Var string of attributes describing the CPU features supported | 412 /* PP_Var string of attributes describing the CPU features supported |
| 425 * by the current architecture. The string is a comma-delimited list | 413 * by the current architecture. The string is a comma-delimited list |
| 426 * of attributes supported by LLVM in its -mattr= option: | 414 * of attributes supported by LLVM in its -mattr= option: |
| 427 * http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr */ | 415 * http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr */ |
| 428 struct PP_Var (*GetCpuFeatureAttrs)(void); | 416 struct PP_Var (*GetCpuFeatureAttrs)(void); |
| 429 /* Posts a message to the JavaScript object for the given instance. | 417 /* Posts a message to the JavaScript object for the given instance. |
| 430 * This method may be called on any thread. | 418 * This method may be called on any thread. |
| 431 */ | 419 */ |
| 432 void (*PostMessageToJavaScript)(PP_Instance instance, const char* message); | 420 void (*PostMessageToJavaScript)(PP_Instance instance, const char* message); |
| 421 /* Downloads the .nexe file at the given URL to a file, and sets |handle| |
| 422 * to a handle to a file containing its contents. */ |
| 423 void (*DownloadNexe)(PP_Instance instance, |
| 424 const char* url, |
| 425 PP_FileHandle* handle, |
| 426 struct PP_CompletionCallback callback); |
| 433 }; | 427 }; |
| 434 | 428 |
| 435 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; | 429 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; |
| 436 /** | 430 /** |
| 437 * @} | 431 * @} |
| 438 */ | 432 */ |
| 439 | 433 |
| 440 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ | 434 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ |
| 441 | 435 |
| OLD | NEW |