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 #include "ppapi/native_client/src/trusted/plugin/plugin.h" | 5 #include "ppapi/native_client/src/trusted/plugin/plugin.h" |
6 | 6 |
7 #include <sys/stat.h> | 7 #include <sys/stat.h> |
8 #include <sys/types.h> | 8 #include <sys/types.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 program_url, | 409 program_url, |
410 pnacl_options, | 410 pnacl_options, |
411 translate_callback)); | 411 translate_callback)); |
412 return; | 412 return; |
413 } else { | 413 } else { |
414 pp::CompletionCallback open_callback = | 414 pp::CompletionCallback open_callback = |
415 callback_factory_.NewCallback(&Plugin::NexeFileDidOpen); | 415 callback_factory_.NewCallback(&Plugin::NexeFileDidOpen); |
416 // Will always call the callback on success or failure. | 416 // Will always call the callback on success or failure. |
417 nacl_interface_->DownloadNexe(pp_instance(), | 417 nacl_interface_->DownloadNexe(pp_instance(), |
418 program_url.c_str(), | 418 program_url.c_str(), |
419 // pre-open resource files on nonsfi mode | |
420 // TODO(yusukes): Enable the feature for | |
421 // SFI-NaCl too. | |
422 uses_nonsfi_mode, | |
423 &nexe_file_info_, | 419 &nexe_file_info_, |
424 &resource_file_handles_, | 420 &resource_file_handles_, |
425 &resource_file_handles_len_, | 421 &resource_file_handles_len_, |
426 open_callback.pp_completion_callback()); | 422 open_callback.pp_completion_callback()); |
427 return; | 423 return; |
428 } | 424 } |
429 } | 425 } |
430 } | 426 } |
431 | 427 |
432 void Plugin::ReportLoadError(const ErrorInfo& error_info) { | 428 void Plugin::ReportLoadError(const ErrorInfo& error_info) { |
433 nacl_interface_->ReportLoadError(pp_instance(), | 429 nacl_interface_->ReportLoadError(pp_instance(), |
434 error_info.error_code(), | 430 error_info.error_code(), |
435 error_info.message().c_str()); | 431 error_info.message().c_str()); |
436 } | 432 } |
437 | 433 |
438 } // namespace plugin | 434 } // namespace plugin |
OLD | NEW |