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 /* 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 /* Dispatch a progress event on the DOM element where the given instance is | 294 /* Dispatch a progress event on the DOM element where the given instance is |
295 * embedded. | 295 * embedded. |
296 */ | 296 */ |
297 void DispatchEvent([in] PP_Instance instance, | 297 void DispatchEvent([in] PP_Instance instance, |
298 [in] PP_NaClEventType event_type, | 298 [in] PP_NaClEventType event_type, |
299 [in] str_t resource_url, | 299 [in] str_t resource_url, |
300 [in] PP_Bool length_is_computable, | 300 [in] PP_Bool length_is_computable, |
301 [in] uint64_t loaded_bytes, | 301 [in] uint64_t loaded_bytes, |
302 [in] uint64_t total_bytes); | 302 [in] uint64_t total_bytes); |
303 | 303 |
304 /* Report that the attempt to open the nexe has finished. Opening the file | |
305 * may have failed, as indicated by a pp_error value that is not PP_OK or an | |
306 * fd of -1. Failure to stat the file to determine its length results in | |
307 * nexe_bytes_read being -1. | |
308 */ | |
309 void NexeFileDidOpen([in] PP_Instance instance, | |
310 [in] int32_t pp_error, | |
311 [in] int32_t fd, | |
312 [in] int32_t http_status, | |
313 [in] int64_t nexe_bytes_read, | |
314 [in] str_t url, | |
315 [in] int64_t time_since_open); | |
316 | |
317 /* Report that the nexe loaded successfully. */ | 304 /* Report that the nexe loaded successfully. */ |
318 void ReportLoadSuccess([in] PP_Instance instance, | 305 void ReportLoadSuccess([in] PP_Instance instance, |
319 [in] str_t url, | 306 [in] str_t url, |
320 [in] uint64_t loaded_bytes, | 307 [in] uint64_t loaded_bytes, |
321 [in] uint64_t total_bytes); | 308 [in] uint64_t total_bytes); |
322 | 309 |
323 /* Report an error that occured while attempting to load a nexe. */ | 310 /* Report an error that occured while attempting to load a nexe. */ |
324 void ReportLoadError([in] PP_Instance instance, | 311 void ReportLoadError([in] PP_Instance instance, |
325 [in] PP_NaClError error, | 312 [in] PP_NaClError error, |
326 [in] str_t error_message, | 313 [in] str_t error_message, |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 // by the current architecture. The string is a comma-delimited list | 432 // by the current architecture. The string is a comma-delimited list |
446 // of attributes supported by LLVM in its -mattr= option: | 433 // of attributes supported by LLVM in its -mattr= option: |
447 // http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr | 434 // http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr |
448 PP_Var GetCpuFeatureAttrs(); | 435 PP_Var GetCpuFeatureAttrs(); |
449 | 436 |
450 /* Posts a message to the JavaScript object for the given instance. | 437 /* Posts a message to the JavaScript object for the given instance. |
451 * This method may be called on any thread. | 438 * This method may be called on any thread. |
452 */ | 439 */ |
453 void PostMessageToJavaScript([in] PP_Instance instance, | 440 void PostMessageToJavaScript([in] PP_Instance instance, |
454 [in] str_t message); | 441 [in] str_t message); |
| 442 |
| 443 /* Downloads the .nexe file at the given URL to a file, and populates |
| 444 * |handle| with a handle to a file containing its contents. */ |
| 445 void DownloadNexe([in] PP_Instance instance, |
| 446 [in] str_t url, |
| 447 [out] PP_FileHandle handle, |
| 448 [in] PP_CompletionCallback callback); |
455 }; | 449 }; |
OLD | NEW |