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 | 5 |
6 /* From private/ppb_nacl_private.idl modified Mon Jul 15 09:19:33 2013. */ | 6 /* From private/ppb_nacl_private.idl modified Tue Jul 23 13:16:52 2013. */ |
7 | 7 |
8 #ifndef PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ | 8 #ifndef PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ |
9 #define PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ | 9 #define PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ |
10 | 10 |
11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.h" |
13 #include "ppapi/c/pp_instance.h" | 13 #include "ppapi/c/pp_instance.h" |
14 #include "ppapi/c/pp_macros.h" | 14 #include "ppapi/c/pp_macros.h" |
15 #include "ppapi/c/pp_stdint.h" | 15 #include "ppapi/c/pp_stdint.h" |
16 #include "ppapi/c/pp_var.h" | 16 #include "ppapi/c/pp_var.h" |
| 17 #include "ppapi/c/private/ppb_instance_private.h" |
17 | 18 |
18 #define PPB_NACL_PRIVATE_INTERFACE_1_0 "PPB_NaCl_Private;1.0" | 19 #define PPB_NACL_PRIVATE_INTERFACE_1_0 "PPB_NaCl_Private;1.0" |
19 #define PPB_NACL_PRIVATE_INTERFACE PPB_NACL_PRIVATE_INTERFACE_1_0 | 20 #define PPB_NACL_PRIVATE_INTERFACE PPB_NACL_PRIVATE_INTERFACE_1_0 |
20 | 21 |
21 /** | 22 /** |
22 * @file | 23 * @file |
23 * This file contains NaCl private interfaces. This interface is not versioned | 24 * This file contains NaCl private interfaces. This interface is not versioned |
24 * and is for internal Chrome use. It may change without notice. */ | 25 * and is for internal Chrome use. It may change without notice. */ |
25 | 26 |
26 | 27 |
27 #include "ppapi/c/private/pp_file_handle.h" | 28 #include "ppapi/c/private/pp_file_handle.h" |
| 29 #include "ppapi/c/private/ppb_instance_private.h" |
28 | 30 |
29 /** | 31 /** |
30 * @addtogroup Enums | 32 * @addtogroup Enums |
31 * @{ | 33 * @{ |
32 */ | 34 */ |
33 /** | |
34 * The <code>PP_NaClResult</code> enum contains NaCl result codes. | |
35 */ | |
36 typedef enum { | |
37 /** Successful NaCl call */ | |
38 PP_NACL_OK = 0, | |
39 /** Unspecified NaCl error */ | |
40 PP_NACL_FAILED = 1, | |
41 /** Error creating the module */ | |
42 PP_NACL_ERROR_MODULE = 2, | |
43 /** Error creating and initializing the instance */ | |
44 PP_NACL_ERROR_INSTANCE = 3 | |
45 } PP_NaClResult; | |
46 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_NaClResult, 4); | |
47 | |
48 /** NaCl-specific errors that should be reported to the user */ | 35 /** NaCl-specific errors that should be reported to the user */ |
49 typedef enum { | 36 typedef enum { |
50 /** | 37 /** |
51 * The manifest program element does not contain a program usable on the | 38 * The manifest program element does not contain a program usable on the |
52 * user's architecture | 39 * user's architecture |
53 */ | 40 */ |
54 PP_NACL_MANIFEST_MISSING_ARCH = 0 | 41 PP_NACL_MANIFEST_MISSING_ARCH = 0 |
55 } PP_NaClError; | 42 } PP_NaClError; |
56 /** | 43 /** |
57 * @} | 44 * @} |
(...skipping 12 matching lines...) Expand all Loading... |
70 * indicates that the nexe run by sel_ldr will use the PPAPI APIs. | 57 * indicates that the nexe run by sel_ldr will use the PPAPI APIs. |
71 * This implies that LaunchSelLdr is run from the main thread. If a nexe | 58 * This implies that LaunchSelLdr is run from the main thread. If a nexe |
72 * does not need PPAPI, then it can run off the main thread. | 59 * does not need PPAPI, then it can run off the main thread. |
73 * The |uses_irt| flag indicates whether the IRT should be loaded in this | 60 * The |uses_irt| flag indicates whether the IRT should be loaded in this |
74 * NaCl process. This is true for ABI stable nexes. | 61 * NaCl process. This is true for ABI stable nexes. |
75 * The |enable_dyncode_syscalls| flag indicates whether or not the nexe | 62 * The |enable_dyncode_syscalls| flag indicates whether or not the nexe |
76 * will be able to use dynamic code system calls (e.g., mmap with PROT_EXEC). | 63 * will be able to use dynamic code system calls (e.g., mmap with PROT_EXEC). |
77 * The |enable_exception_handling| flag indicates whether or not the nexe | 64 * The |enable_exception_handling| flag indicates whether or not the nexe |
78 * will be able to use hardware exception handling. | 65 * will be able to use hardware exception handling. |
79 */ | 66 */ |
80 PP_NaClResult (*LaunchSelLdr)(PP_Instance instance, | 67 PP_ExternalPluginResult (*LaunchSelLdr)(PP_Instance instance, |
81 const char* alleged_url, | 68 const char* alleged_url, |
82 PP_Bool uses_irt, | 69 PP_Bool uses_irt, |
83 PP_Bool uses_ppapi, | 70 PP_Bool uses_ppapi, |
84 PP_Bool enable_ppapi_dev, | 71 PP_Bool enable_ppapi_dev, |
85 PP_Bool enable_dyncode_syscalls, | 72 PP_Bool enable_dyncode_syscalls, |
86 PP_Bool enable_exception_handling, | 73 PP_Bool enable_exception_handling, |
87 void* imc_handle, | 74 void* imc_handle, |
88 struct PP_Var* error_message); | 75 struct PP_Var* error_message); |
89 /* This function starts the IPC proxy so the nexe can communicate with the | 76 /* This function starts the IPC proxy so the nexe can communicate with the |
90 * browser. Returns PP_NACL_OK on success, otherwise a result code indicating | 77 * browser. Returns PP_NACL_OK on success, otherwise a result code indicating |
91 * the failure. PP_NACL_FAILED is returned if LaunchSelLdr wasn't called with | 78 * the failure. PP_NACL_FAILED is returned if LaunchSelLdr wasn't called with |
92 * the instance. PP_NACL_ERROR_MODULE is returned if the module can't be | 79 * the instance. PP_NACL_ERROR_MODULE is returned if the module can't be |
93 * initialized. PP_NACL_ERROR_INSTANCE is returned if the instance can't be | 80 * initialized. PP_NACL_ERROR_INSTANCE is returned if the instance can't be |
94 * initialized. PP_NACL_USE_SRPC is returned if the plugin should use SRPC. | 81 * initialized. PP_NACL_USE_SRPC is returned if the plugin should use SRPC. |
95 */ | 82 */ |
96 PP_NaClResult (*StartPpapiProxy)(PP_Instance instance); | 83 PP_ExternalPluginResult (*StartPpapiProxy)(PP_Instance instance); |
97 /* On POSIX systems, this function returns the file descriptor of | 84 /* On POSIX systems, this function returns the file descriptor of |
98 * /dev/urandom. On non-POSIX systems, this function returns 0. | 85 * /dev/urandom. On non-POSIX systems, this function returns 0. |
99 */ | 86 */ |
100 int32_t (*UrandomFD)(void); | 87 int32_t (*UrandomFD)(void); |
101 /* Whether the Pepper 3D interfaces should be disabled in the NaCl PPAPI | 88 /* Whether the Pepper 3D interfaces should be disabled in the NaCl PPAPI |
102 * proxy. This is so paranoid admins can effectively prevent untrusted shader | 89 * proxy. This is so paranoid admins can effectively prevent untrusted shader |
103 * code to be processed by the graphics stack. | 90 * code to be processed by the graphics stack. |
104 */ | 91 */ |
105 PP_Bool (*Are3DInterfacesDisabled)(void); | 92 PP_Bool (*Are3DInterfacesDisabled)(void); |
106 /* This is Windows-specific. This is a replacement for DuplicateHandle() for | 93 /* This is Windows-specific. This is a replacement for DuplicateHandle() for |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 * mode, no notification will be delivered to the plugin.) | 142 * mode, no notification will be delivered to the plugin.) |
156 */ | 143 */ |
157 void (*ReportTranslationFinished)(PP_Instance instance); | 144 void (*ReportTranslationFinished)(PP_Instance instance); |
158 /* Return true if we are off the record. | 145 /* Return true if we are off the record. |
159 */ | 146 */ |
160 PP_Bool (*IsOffTheRecord)(void); | 147 PP_Bool (*IsOffTheRecord)(void); |
161 /* Return true if PNaCl is turned on. | 148 /* Return true if PNaCl is turned on. |
162 */ | 149 */ |
163 PP_Bool (*IsPnaclEnabled)(void); | 150 PP_Bool (*IsPnaclEnabled)(void); |
164 /* Display a UI message to the user. */ | 151 /* Display a UI message to the user. */ |
165 PP_NaClResult (*ReportNaClError)(PP_Instance instance, | 152 PP_ExternalPluginResult (*ReportNaClError)(PP_Instance instance, |
166 PP_NaClError message_id); | 153 PP_NaClError message_id); |
167 /* Opens a NaCl executable file in the application's extension directory | 154 /* Opens a NaCl executable file in the application's extension directory |
168 * corresponding to the file URL and returns a file descriptor, or an invalid | 155 * corresponding to the file URL and returns a file descriptor, or an invalid |
169 * handle on failure. |metadata| is left unchanged on failure. | 156 * handle on failure. |metadata| is left unchanged on failure. |
170 */ | 157 */ |
171 PP_FileHandle (*OpenNaClExecutable)(PP_Instance instance, | 158 PP_FileHandle (*OpenNaClExecutable)(PP_Instance instance, |
172 const char* file_url, | 159 const char* file_url, |
173 uint64_t* file_token_lo, | 160 uint64_t* file_token_lo, |
174 uint64_t* file_token_hi); | 161 uint64_t* file_token_hi); |
175 }; | 162 }; |
176 | 163 |
177 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; | 164 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; |
178 /** | 165 /** |
179 * @} | 166 * @} |
180 */ | 167 */ |
181 | 168 |
182 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ | 169 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ |
183 | 170 |
OLD | NEW |