OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #define NACL_LOG_MODULE_NAME "Plugin::ServiceRuntime" | 7 #define NACL_LOG_MODULE_NAME "Plugin::ServiceRuntime" |
8 | 8 |
9 #include "native_client/src/trusted/plugin/service_runtime.h" | 9 #include "native_client/src/trusted/plugin/service_runtime.h" |
10 | 10 |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 ERROR_SEL_LDR_START_STATUS, | 693 ERROR_SEL_LDR_START_STATUS, |
694 NaClErrorString(static_cast<NaClErrorCode>(load_status))); | 694 NaClErrorString(static_cast<NaClErrorCode>(load_status))); |
695 return false; | 695 return false; |
696 } | 696 } |
697 return true; | 697 return true; |
698 } | 698 } |
699 | 699 |
700 bool ServiceRuntime::Start(nacl::DescWrapper* nacl_desc, | 700 bool ServiceRuntime::Start(nacl::DescWrapper* nacl_desc, |
701 ErrorInfo* error_info, | 701 ErrorInfo* error_info, |
702 const nacl::string& url, | 702 const nacl::string& url, |
| 703 bool uses_ppapi, |
703 bool enable_ppapi_dev, | 704 bool enable_ppapi_dev, |
704 pp::CompletionCallback crash_cb) { | 705 pp::CompletionCallback crash_cb) { |
705 PLUGIN_PRINTF(("ServiceRuntime::Start (nacl_desc=%p)\n", | 706 PLUGIN_PRINTF(("ServiceRuntime::Start (nacl_desc=%p)\n", |
706 reinterpret_cast<void*>(nacl_desc))); | 707 reinterpret_cast<void*>(nacl_desc))); |
707 | 708 |
708 nacl::scoped_ptr<SelLdrLauncherChrome> | 709 nacl::scoped_ptr<SelLdrLauncherChrome> |
709 tmp_subprocess(new SelLdrLauncherChrome()); | 710 tmp_subprocess(new SelLdrLauncherChrome()); |
710 if (NULL == tmp_subprocess.get()) { | 711 if (NULL == tmp_subprocess.get()) { |
711 PLUGIN_PRINTF(("ServiceRuntime::Start (subprocess create failed)\n")); | 712 PLUGIN_PRINTF(("ServiceRuntime::Start (subprocess create failed)\n")); |
712 error_info->SetReport(ERROR_SEL_LDR_CREATE_LAUNCHER, | 713 error_info->SetReport(ERROR_SEL_LDR_CREATE_LAUNCHER, |
713 "ServiceRuntime: failed to create sel_ldr launcher"); | 714 "ServiceRuntime: failed to create sel_ldr launcher"); |
714 return false; | 715 return false; |
715 } | 716 } |
716 bool started = tmp_subprocess->Start(plugin_->pp_instance(), | 717 bool started = tmp_subprocess->Start(plugin_->pp_instance(), |
717 url.c_str(), | 718 url.c_str(), |
| 719 uses_ppapi, |
718 enable_ppapi_dev); | 720 enable_ppapi_dev); |
719 if (!started) { | 721 if (!started) { |
720 PLUGIN_PRINTF(("ServiceRuntime::Start (start failed)\n")); | 722 PLUGIN_PRINTF(("ServiceRuntime::Start (start failed)\n")); |
721 error_info->SetReport(ERROR_SEL_LDR_LAUNCH, | 723 error_info->SetReport(ERROR_SEL_LDR_LAUNCH, |
722 "ServiceRuntime: failed to start"); | 724 "ServiceRuntime: failed to start"); |
723 return false; | 725 return false; |
724 } | 726 } |
725 | 727 |
726 subprocess_.reset(tmp_subprocess.release()); | 728 subprocess_.reset(tmp_subprocess.release()); |
727 if (!InitCommunication(nacl_desc, error_info)) { | 729 if (!InitCommunication(nacl_desc, error_info)) { |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 | 831 |
830 nacl::string ServiceRuntime::GetCrashLogOutput() { | 832 nacl::string ServiceRuntime::GetCrashLogOutput() { |
831 if (NULL != subprocess_.get()) { | 833 if (NULL != subprocess_.get()) { |
832 return subprocess_->GetCrashLogOutput(); | 834 return subprocess_->GetCrashLogOutput(); |
833 } else { | 835 } else { |
834 return ""; | 836 return ""; |
835 } | 837 } |
836 } | 838 } |
837 | 839 |
838 } // namespace plugin | 840 } // namespace plugin |
OLD | NEW |