From 498e05a48dfade51ef44a1b5ed648bd2dfc3c6f0 Mon Sep 17 00:00:00 2001 From: "abarth@chromium.org" Date: Fri, 17 Dec 2010 19:57:49 +0000 Subject: Add stub PPAPI for launching NaCl's sel_ldr process. In ArcticSea, we're going to load the NaCl plugin in the render process. The NaCl plugin needs to create a sel_ldr process to host the NEXE, but when the plugin lives inside the render process, the plugin is sandboxed, so it can't create a process. This API instructs the browser to launch a sel_ldr process and wire up a bunch of IMC channels between the plugin and the new process. In reality, the sel_ldr process is just chrome.exe run with a command line flag that causes it to call NaClMain instead of BrowserMain or RendererMain. Previously, NaCl accomplished this task by smuggling a function pointer (cast as an int) from render_process_impl to the NPAPI NaCl plugin. Rather than use the same approach again, we're creating a legit way for the PPAPI plugin to ask the browser to spawn the sel_ldr process. In BalticSea, we'll likely run the NaCl plugin out-of-process (e.g., in a PPAPI process). In that case, the plugin can just host the NEXE internally, and we'll be able to remove this interface. Review URL: http://codereview.chromium.org/5897004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69568 0039d316-1c4b-4281-b951-d872f2087c98 --- ppapi/c/private/ppb_nacl_util_private.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 ppapi/c/private/ppb_nacl_util_private.h (limited to 'ppapi/c/private') diff --git a/ppapi/c/private/ppb_nacl_util_private.h b/ppapi/c/private/ppb_nacl_util_private.h new file mode 100644 index 0000000..3a8354e --- /dev/null +++ b/ppapi/c/private/ppb_nacl_util_private.h @@ -0,0 +1,17 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef PPAPI_C_PRIVATE_PPB_NACL_UTIL_PRIVATE_H_ +#define PPAPI_C_PRIVATE_PPB_NACL_UTIL_PRIVATE_H_ + +#include "ppapi/c/pp_resource.h" +#include "ppapi/c/pp_stdint.h" + +#define PPB_NACLUTIL_PRIVATE_INTERFACE "PPB_NaClUtil(Private);0.1" + +struct PPB_NaClUtil_Private { + int32_t (*LaunchSelLdr)(PP_Resource file_io); +}; + +#endif // PPAPI_C_PRIVATE_PPB_NACL_UTIL_PRIVATE_H_ -- cgit v1.1