| 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 "components/nacl/renderer/plugin/plugin.h" | 5 #include "components/nacl/renderer/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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 PP_PNACL_PROCESS_TYPE); | 328 PP_PNACL_PROCESS_TYPE); |
| 329 } | 329 } |
| 330 | 330 |
| 331 void Plugin::NaClManifestFileDidOpen(int32_t pp_error) { | 331 void Plugin::NaClManifestFileDidOpen(int32_t pp_error) { |
| 332 PLUGIN_PRINTF(("Plugin::NaClManifestFileDidOpen (pp_error=%" | 332 PLUGIN_PRINTF(("Plugin::NaClManifestFileDidOpen (pp_error=%" |
| 333 NACL_PRId32 ")\n", pp_error)); | 333 NACL_PRId32 ")\n", pp_error)); |
| 334 if (pp_error != PP_OK) | 334 if (pp_error != PP_OK) |
| 335 return; | 335 return; |
| 336 | 336 |
| 337 PP_Var pp_program_url; | 337 PP_Var pp_program_url; |
| 338 PP_PNaClOptions pnacl_options = {PP_FALSE, PP_FALSE, 2}; | 338 PP_PNaClOptions pnacl_options = {PP_FALSE, PP_FALSE, PP_FALSE, 2}; |
| 339 PP_Bool uses_nonsfi_mode; | 339 PP_Bool uses_nonsfi_mode; |
| 340 if (nacl_interface_->GetManifestProgramURL( | 340 if (nacl_interface_->GetManifestProgramURL( |
| 341 pp_instance(), &pp_program_url, &pnacl_options, &uses_nonsfi_mode)) { | 341 pp_instance(), &pp_program_url, &pnacl_options, &uses_nonsfi_mode)) { |
| 342 std::string program_url = pp::Var(pp::PASS_REF, pp_program_url).AsString(); | 342 std::string program_url = pp::Var(pp::PASS_REF, pp_program_url).AsString(); |
| 343 // TODO(teravest): Make ProcessNaClManifest take responsibility for more of | 343 // TODO(teravest): Make ProcessNaClManifest take responsibility for more of |
| 344 // this function. | 344 // this function. |
| 345 nacl_interface_->ProcessNaClManifest(pp_instance(), program_url.c_str()); | 345 nacl_interface_->ProcessNaClManifest(pp_instance(), program_url.c_str()); |
| 346 uses_nonsfi_mode_ = PP_ToBool(uses_nonsfi_mode); | 346 uses_nonsfi_mode_ = PP_ToBool(uses_nonsfi_mode); |
| 347 if (pnacl_options.translate) { | 347 if (pnacl_options.translate) { |
| 348 pp::CompletionCallback translate_callback = | 348 pp::CompletionCallback translate_callback = |
| (...skipping 17 matching lines...) Expand all Loading... |
| 366 } | 366 } |
| 367 } | 367 } |
| 368 | 368 |
| 369 void Plugin::ReportLoadError(const ErrorInfo& error_info) { | 369 void Plugin::ReportLoadError(const ErrorInfo& error_info) { |
| 370 nacl_interface_->ReportLoadError(pp_instance(), | 370 nacl_interface_->ReportLoadError(pp_instance(), |
| 371 error_info.error_code(), | 371 error_info.error_code(), |
| 372 error_info.message().c_str()); | 372 error_info.message().c_str()); |
| 373 } | 373 } |
| 374 | 374 |
| 375 } // namespace plugin | 375 } // namespace plugin |
| OLD | NEW |