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 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_instance.h" |
8 #include "ppapi/c/pp_resource.h" | 9 #include "ppapi/c/pp_resource.h" |
9 #include "ppapi/c/pp_stdint.h" | 10 #include "ppapi/c/pp_stdint.h" |
10 | 11 |
11 #define PPB_NACL_PRIVATE_INTERFACE "PPB_NaCl(Private);0.4" | 12 #define PPB_NACL_PRIVATE_INTERFACE "PPB_NaCl(Private);0.5" |
12 | 13 |
13 struct PPB_NaCl_Private { | 14 struct PPB_NaCl_Private { |
14 // This function launches NaCl's sel_ldr process. On success, the function | 15 // 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 // returns true, otherwise it returns false. When it returns true, it will |
16 // write |socket_count| nacl::Handles to imc_handles. Unless | 17 // write |socket_count| nacl::Handles to imc_handles. Unless |
17 // EnableBackgroundSelLdrLaunch is called, this method must be invoked from | 18 // EnableBackgroundSelLdrLaunch is called, this method must be invoked from |
18 // the main thread. | 19 // the main thread. |
19 bool (*LaunchSelLdr)(const char* alleged_url, int socket_count, | 20 bool (*LaunchSelLdr)(PP_Instance instance, |
| 21 const char* alleged_url, |
| 22 int socket_count, |
20 void* imc_handles); | 23 void* imc_handles); |
21 | 24 |
| 25 // This function starts the PPAPI proxy so the nexe can communicate with the |
| 26 // browser's renderer process. |
| 27 bool (*StartPpapiProxy)(PP_Instance instance); |
| 28 |
22 // On POSIX systems, this function returns the file descriptor of | 29 // On POSIX systems, this function returns the file descriptor of |
23 // /dev/urandom. On non-POSIX systems, this function returns 0. | 30 // /dev/urandom. On non-POSIX systems, this function returns 0. |
24 int (*UrandomFD)(void); | 31 int (*UrandomFD)(void); |
25 | 32 |
26 // Whether the Pepper 3D interfaces should be disabled in the NaCl PPAPI | 33 // Whether the Pepper 3D interfaces should be disabled in the NaCl PPAPI |
27 // proxy. This is so paranoid admins can effectively prevent untrusted shader | 34 // proxy. This is so paranoid admins can effectively prevent untrusted shader |
28 // code to be processed by the graphics stack. | 35 // code to be processed by the graphics stack. |
29 bool (*Are3DInterfacesDisabled)(); | 36 bool (*Are3DInterfacesDisabled)(); |
30 | 37 |
31 // Enables the creation of sel_ldr processes from other than the main thread. | 38 // Enables the creation of sel_ldr processes from other than the main thread. |
(...skipping 10 matching lines...) Expand all Loading... |
42 // usable with NaClSetBrokerDuplicateHandleFunc() without further | 49 // usable with NaClSetBrokerDuplicateHandleFunc() without further |
43 // wrapping. | 50 // wrapping. |
44 int (*BrokerDuplicateHandle)(void* source_handle, | 51 int (*BrokerDuplicateHandle)(void* source_handle, |
45 uint32_t process_id, | 52 uint32_t process_id, |
46 void** target_handle, | 53 void** target_handle, |
47 uint32_t desired_access, | 54 uint32_t desired_access, |
48 uint32_t options); | 55 uint32_t options); |
49 }; | 56 }; |
50 | 57 |
51 #endif // PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ | 58 #endif // PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ |
OLD | NEW |