| 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_bool.h" | 8 #include "ppapi/c/pp_bool.h" |
| 9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
| 10 #include "ppapi/c/pp_resource.h" | 10 #include "ppapi/c/pp_resource.h" |
| 11 #include "ppapi/c/pp_stdint.h" | 11 #include "ppapi/c/pp_stdint.h" |
| 12 #include "ppapi/c/private/pp_file_handle.h" | 12 #include "ppapi/c/private/pp_file_handle.h" |
| 13 | 13 |
| 14 #define PPB_NACL_PRIVATE_INTERFACE "PPB_NaCl(Private);0.9" | 14 #define PPB_NACL_PRIVATE_INTERFACE "PPB_NaCl(Private);0.9" |
| 15 | 15 |
| 16 struct PPB_NaCl_Private { | 16 struct PPB_NaCl_Private { |
| 17 // This function launches NaCl's sel_ldr process. On success, the function | 17 // This function launches NaCl's sel_ldr process. On success, the function |
| 18 // returns true, otherwise it returns false. When it returns true, it will | 18 // returns true, otherwise it returns false. When it returns true, it will |
| 19 // write |socket_count| nacl::Handles to imc_handles. Unless | 19 // write |socket_count| nacl::Handles to imc_handles. Unless |
| 20 // EnableBackgroundSelLdrLaunch is called, this method must be invoked from | 20 // EnableBackgroundSelLdrLaunch is called, this method must be invoked from |
| 21 // the main thread. | 21 // the main thread. |
| 22 PP_Bool (*LaunchSelLdr)(PP_Instance instance, | 22 PP_Bool (*LaunchSelLdr)(PP_Instance instance, |
| 23 const char* alleged_url, | 23 const char* alleged_url, |
| 24 int socket_count, | 24 int socket_count, |
| 25 void* imc_handles); | 25 void* imc_handles); |
| 26 | 26 |
| 27 // This function starts the PPAPI proxy so the nexe can communicate with the | 27 // This function starts the PPAPI proxy so the nexe can communicate with the |
| 28 // browser's renderer process. | 28 // browser's renderer process. Allow 'Dev' interfaces if |allow_dev| is true. |
| 29 PP_Bool (*StartPpapiProxy)(PP_Instance instance); | 29 PP_Bool (*StartPpapiProxy)(PP_Instance instance, |
| 30 bool allow_dev_interfaces); |
| 30 | 31 |
| 31 // On POSIX systems, this function returns the file descriptor of | 32 // On POSIX systems, this function returns the file descriptor of |
| 32 // /dev/urandom. On non-POSIX systems, this function returns 0. | 33 // /dev/urandom. On non-POSIX systems, this function returns 0. |
| 33 int (*UrandomFD)(void); | 34 int (*UrandomFD)(void); |
| 34 | 35 |
| 35 // Whether the Pepper 3D interfaces should be disabled in the NaCl PPAPI | 36 // Whether the Pepper 3D interfaces should be disabled in the NaCl PPAPI |
| 36 // proxy. This is so paranoid admins can effectively prevent untrusted shader | 37 // proxy. This is so paranoid admins can effectively prevent untrusted shader |
| 37 // code to be processed by the graphics stack. | 38 // code to be processed by the graphics stack. |
| 38 bool (*Are3DInterfacesDisabled)(); | 39 bool (*Are3DInterfacesDisabled)(); |
| 39 | 40 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 68 PP_FileHandle (*CreateTemporaryFile)(PP_Instance instance); | 69 PP_FileHandle (*CreateTemporaryFile)(PP_Instance instance); |
| 69 | 70 |
| 70 // Return true if we are off the record. | 71 // Return true if we are off the record. |
| 71 PP_Bool (*IsOffTheRecord)(void); | 72 PP_Bool (*IsOffTheRecord)(void); |
| 72 | 73 |
| 73 // Return true if PNaCl is turned on. | 74 // Return true if PNaCl is turned on. |
| 74 PP_Bool (*IsPnaclEnabled)(void); | 75 PP_Bool (*IsPnaclEnabled)(void); |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 #endif // PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ | 78 #endif // PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ |
| OLD | NEW |