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 3 // found in the LICENSE file. 4 5 #include "native_client/src/include/nacl_macros.h" 6 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/cpp/module.h" 8 #include "ppapi/native_client/src/trusted/plugin/sel_ldr_launcher_chrome.h" 9 #include "ppapi/native_client/src/trusted/plugin/utility.h" 10 11 namespace plugin { 12 13 bool SelLdrLauncherChrome::Start(const char* url) { 14 NACL_NOTREACHED(); 15 return false; 16 } 17 18 void SelLdrLauncherChrome::Start( 19 PP_Instance instance, 20 bool main_service_runtime, 21 const char* url, 22 bool uses_irt, 23 bool uses_ppapi, 24 bool uses_nonsfi_mode, 25 bool enable_ppapi_dev, 26 bool enable_dyncode_syscalls, 27 bool enable_exception_handling, 28 bool enable_crash_throttling, 29 const PPP_ManifestService* manifest_service_interface, 30 void* manifest_service_user_data, 31 pp::CompletionCallback callback) { 32 if (!GetNaClInterface()) { 33 pp::Module::Get()->core()->CallOnMainThread(0, callback, PP_ERROR_FAILED); 34 return; 35 } 36 GetNaClInterface()->LaunchSelLdr( 37 instance, 38 PP_FromBool(main_service_runtime), 39 url, 40 PP_FromBool(uses_irt), 41 PP_FromBool(uses_ppapi), 42 PP_FromBool(uses_nonsfi_mode), 43 PP_FromBool(enable_ppapi_dev), 44 PP_FromBool(enable_dyncode_syscalls), 45 PP_FromBool(enable_exception_handling), 46 PP_FromBool(enable_crash_throttling), 47 manifest_service_interface, 48 manifest_service_user_data, 49 &channel_, 50 callback.pp_completion_callback()); 51 } 52 53 } // namespace plugin 54