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.
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/nacl_entry_points.h"
9 #include "ppapi/native_client/src/trusted/plugin/sel_ldr_launcher_chrome.h"
11 LaunchNaClProcessFunc launch_nacl_process = NULL;
15 bool SelLdrLauncherChrome::Start(const char* url) {
20 void SelLdrLauncherChrome::Start(PP_Instance instance,
24 bool enable_ppapi_dev,
25 bool enable_dyncode_syscalls,
26 bool enable_exception_handling,
27 bool enable_crash_throttling,
28 PP_Var* error_message,
29 pp::CompletionCallback callback) {
30 if (!launch_nacl_process) {
31 pp::Module::Get()->core()->CallOnMainThread(0, callback, PP_ERROR_FAILED);
34 launch_nacl_process(instance,
36 PP_FromBool(uses_irt),
37 PP_FromBool(uses_ppapi),
38 PP_FromBool(enable_ppapi_dev),
39 PP_FromBool(enable_dyncode_syscalls),
40 PP_FromBool(enable_exception_handling),
41 PP_FromBool(enable_crash_throttling),
44 callback.pp_completion_callback());