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 #ifndef COMPONENTS_NACL_RENDERER_PPB_NACL_PRIVATE_H_ | 5 #ifndef COMPONENTS_NACL_RENDERER_PPB_NACL_PRIVATE_H_ |
6 #define COMPONENTS_NACL_RENDERER_PPB_NACL_PRIVATE_H_ | 6 #define COMPONENTS_NACL_RENDERER_PPB_NACL_PRIVATE_H_ |
7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/process/process_handle.h" |
| 10 #include "ipc/ipc_sync_channel.h" |
8 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
9 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.h" |
10 #include "ppapi/c/pp_instance.h" | 13 #include "ppapi/c/pp_instance.h" |
11 #include "ppapi/c/pp_macros.h" | 14 #include "ppapi/c/pp_macros.h" |
12 #include "ppapi/c/pp_stdint.h" | 15 #include "ppapi/c/pp_stdint.h" |
13 #include "ppapi/c/pp_var.h" | 16 #include "ppapi/c/pp_var.h" |
14 #include "ppapi/c/private/pp_file_handle.h" | 17 #include "ppapi/c/private/pp_file_handle.h" |
15 #include "ppapi/c/private/ppb_instance_private.h" | 18 #include "ppapi/c/private/ppb_instance_private.h" |
16 #include "ppapi/c/private/ppp_pexe_stream_handler.h" | 19 #include "ppapi/c/private/ppp_pexe_stream_handler.h" |
17 | 20 |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 */ | 210 */ |
208 struct PPB_NaCl_Private { | 211 struct PPB_NaCl_Private { |
209 /* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success | 212 /* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success |
210 * and writes a NaClHandle to imc_handle. Returns PP_EXTERNAL_PLUGIN_FAILED on | 213 * and writes a NaClHandle to imc_handle. Returns PP_EXTERNAL_PLUGIN_FAILED on |
211 * failure. | 214 * failure. |
212 * The |nexe_file_info| is currently used only in non-SFI mode. It is the | 215 * The |nexe_file_info| is currently used only in non-SFI mode. It is the |
213 * file handle for the main nexe file, which should be initially loaded. | 216 * file handle for the main nexe file, which should be initially loaded. |
214 * LaunchSelLdr takes the ownership of the file handle. | 217 * LaunchSelLdr takes the ownership of the file handle. |
215 * The |uses_nonsfi_mode| flag indicates whether or not nonsfi-mode should | 218 * The |uses_nonsfi_mode| flag indicates whether or not nonsfi-mode should |
216 * be used with the binary pointed by the url. | 219 * be used with the binary pointed by the url. |
| 220 * |translator_channel| and |process_id| are filled out when launching PNaCl |
| 221 * translator processes. |
217 */ | 222 */ |
218 void (*LaunchSelLdr)(PP_Instance instance, | 223 void (*LaunchSelLdr)(PP_Instance instance, |
219 PP_Bool main_service_runtime, | 224 PP_Bool main_service_runtime, |
220 const char* alleged_url, | 225 const char* alleged_url, |
221 const struct PP_NaClFileInfo* nexe_file_info, | 226 const struct PP_NaClFileInfo* nexe_file_info, |
222 PP_Bool uses_nonsfi_mode, | 227 PP_Bool uses_nonsfi_mode, |
223 PP_NaClAppProcessType process_type, | 228 PP_NaClAppProcessType process_type, |
224 void* imc_handle, | 229 void* imc_handle, |
| 230 scoped_ptr<IPC::SyncChannel>* translator_channel, |
| 231 base::ProcessId* process_id, |
225 struct PP_CompletionCallback callback); | 232 struct PP_CompletionCallback callback); |
226 /* On POSIX systems, this function returns the file descriptor of | 233 /* On POSIX systems, this function returns the file descriptor of |
227 * /dev/urandom. On non-POSIX systems, this function returns 0. | 234 * /dev/urandom. On non-POSIX systems, this function returns 0. |
228 */ | 235 */ |
229 int32_t (*UrandomFD)(void); | 236 int32_t (*UrandomFD)(void); |
230 /* This is Windows-specific. This is a replacement for DuplicateHandle() for | 237 /* This is Windows-specific. This is a replacement for DuplicateHandle() for |
231 * use inside the Windows sandbox. Note that we provide this via dependency | 238 * use inside the Windows sandbox. Note that we provide this via dependency |
232 * injection only to avoid the linkage problems that occur because the NaCl | 239 * injection only to avoid the linkage problems that occur because the NaCl |
233 * plugin is built as a separate DLL/DSO | 240 * plugin is built as a separate DLL/DSO |
234 * (see http://code.google.com/p/chromium/issues/detail?id=114439#c8). | 241 * (see http://code.google.com/p/chromium/issues/detail?id=114439#c8). |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 int32_t opt_level, | 358 int32_t opt_level, |
352 PP_Bool use_subzero, | 359 PP_Bool use_subzero, |
353 const struct PPP_PexeStreamHandler_1_0* stream_handler, | 360 const struct PPP_PexeStreamHandler_1_0* stream_handler, |
354 void* stream_handler_user_data); | 361 void* stream_handler_user_data); |
355 }; | 362 }; |
356 /** | 363 /** |
357 * @} | 364 * @} |
358 */ | 365 */ |
359 | 366 |
360 #endif /* COMPONENTS_NACL_RENDERER_PPB_NACL_PRIVATE_H_ */ | 367 #endif /* COMPONENTS_NACL_RENDERER_PPB_NACL_PRIVATE_H_ */ |
OLD | NEW |