OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 PPAPI_C_PRIVATE_PPB_NACL_UTIL_PRIVATE_H_ | 5 #ifndef PPAPI_C_PRIVATE_PPB_NACL_UTIL_PRIVATE_H_ |
6 #define PPAPI_C_PRIVATE_PPB_NACL_UTIL_PRIVATE_H_ | 6 #define PPAPI_C_PRIVATE_PPB_NACL_UTIL_PRIVATE_H_ |
7 | 7 |
8 #include "ppapi/c/pp_resource.h" | 8 #include "ppapi/c/pp_resource.h" |
9 #include "ppapi/c/pp_stdint.h" | 9 #include "ppapi/c/pp_stdint.h" |
10 | 10 |
11 #define PPB_NACLUTIL_PRIVATE_INTERFACE "PPB_NaClUtil(Private);0.1" | 11 #define PPB_NACLUTIL_PRIVATE_INTERFACE "PPB_NaClUtil(Private);0.1" |
12 | 12 |
13 struct PPB_NaClUtil_Private { | 13 struct PPB_NaClUtil_Private { |
14 int32_t (*LaunchSelLdr)(PP_Resource file_io); | 14 // This function launches NaCl's sel_ldr process. On success, the function |
| 15 // returns true, otherwise it returns false. When it returns true, it will |
| 16 // write |socket_count| nacl::Handles to imc_handles and will write the |
| 17 // nacl::Handle of the created process to |nacl_process_handle|. Finally, |
| 18 // the function will write the process ID of the created process to |
| 19 // |nacl_process_id|. |
| 20 bool (*LaunchSelLdr)(const char* alleged_url, int socket_count, |
| 21 void* imc_handles, void* nacl_process_handle, |
| 22 int* nacl_process_id); |
| 23 |
| 24 // On POSIX systems, this function returns the file descriptor of |
| 25 // /dev/urandom. On non-POSIX systems, this function returns 0. |
| 26 int (*UrandomFD)(void); |
15 }; | 27 }; |
16 | 28 |
17 #endif // PPAPI_C_PRIVATE_PPB_NACL_UTIL_PRIVATE_H_ | 29 #endif // PPAPI_C_PRIVATE_PPB_NACL_UTIL_PRIVATE_H_ |
OLD | NEW |