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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 // by the current architecture. The string is a comma-delimited list | 420 // by the current architecture. The string is a comma-delimited list |
434 // of attributes supported by LLVM in its -mattr= option: | 421 // of attributes supported by LLVM in its -mattr= option: |
435 // http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr | 422 // http://llvm.org/docs/CommandGuide/llc.html#cmdoption-mattr |
436 PP_Var GetCpuFeatureAttrs(); | 423 PP_Var GetCpuFeatureAttrs(); |
437 | 424 |
438 /* Posts a message to the JavaScript object for the given instance. | 425 /* Posts a message to the JavaScript object for the given instance. |
439 * This method may be called on any thread. | 426 * This method may be called on any thread. |
440 */ | 427 */ |
441 void PostMessageToJavaScript([in] PP_Instance instance, | 428 void PostMessageToJavaScript([in] PP_Instance instance, |
442 [in] str_t message); | 429 [in] str_t message); |
| 430 |
| 431 /* Downloads the .nexe file at the given URL to a file, and sets |handle| |
| 432 * to a handle to a file containing its contents. */ |
| 433 void DownloadNexe([in] PP_Instance instance, |
| 434 [in] str_t url, |
| 435 [out] PP_FileHandle handle, |
| 436 [in] PP_CompletionCallback callback); |
443 }; | 437 }; |
OLD | NEW |