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 Wed Apr 30 14:13:27 2014. */ | 6 /* From private/ppb_nacl_private.idl modified Sat May 3 04:07:13 2014. */ |
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 | 17 |
18 #define PP_MANIFESTSERVICE_INTERFACE_1_0 "PP_ManifestService;1.0" | 18 #define PPP_MANIFESTSERVICE_INTERFACE_1_0 "PPP_ManifestService;1.0" |
19 #define PP_MANIFESTSERVICE_INTERFACE PP_MANIFESTSERVICE_INTERFACE_1_0 | 19 #define PPP_MANIFESTSERVICE_INTERFACE PPP_MANIFESTSERVICE_INTERFACE_1_0 |
20 | 20 |
21 #define PPB_NACL_PRIVATE_INTERFACE_1_0 "PPB_NaCl_Private;1.0" | 21 #define PPB_NACL_PRIVATE_INTERFACE_1_0 "PPB_NaCl_Private;1.0" |
22 #define PPB_NACL_PRIVATE_INTERFACE PPB_NACL_PRIVATE_INTERFACE_1_0 | 22 #define PPB_NACL_PRIVATE_INTERFACE PPB_NACL_PRIVATE_INTERFACE_1_0 |
23 | 23 |
24 /** | 24 /** |
25 * @file | 25 * @file |
26 * This file contains NaCl private interfaces. This interface is not versioned | 26 * This file contains NaCl private interfaces. This interface is not versioned |
27 * and is for internal Chrome use. It may change without notice. */ | 27 * and is for internal Chrome use. It may change without notice. */ |
28 | 28 |
29 | 29 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 struct PP_PNaClOptions { | 161 struct PP_PNaClOptions { |
162 PP_Bool translate; | 162 PP_Bool translate; |
163 PP_Bool is_debug; | 163 PP_Bool is_debug; |
164 int32_t opt_level; | 164 int32_t opt_level; |
165 }; | 165 }; |
166 /** | 166 /** |
167 * @} | 167 * @} |
168 */ | 168 */ |
169 | 169 |
170 /** | 170 /** |
| 171 * @addtogroup Typedefs |
| 172 * @{ |
| 173 */ |
| 174 /* Callback invoked upon completion of PPP_ManifestService::OpenResource(). */ |
| 175 typedef void (*PP_OpenResourceCompletionCallback)(void* user_data, |
| 176 PP_FileHandle file_handle); |
| 177 /** |
| 178 * @} |
| 179 */ |
| 180 |
| 181 /** |
171 * @addtogroup Interfaces | 182 * @addtogroup Interfaces |
172 * @{ | 183 * @{ |
173 */ | 184 */ |
174 /* ManifestService to support irt_open_resource() function. | 185 /* ManifestService to support irt_open_resource() function. |
175 * All functions of the service should have PP_Bool return value. It represents | 186 * All functions of the service should have PP_Bool return value. It represents |
176 * whether the service is still alive or not. Trivially Quit() should always | 187 * whether the service is still alive or not. Trivially Quit() should always |
177 * return false. However, other functions also can return false. | 188 * return false. However, other functions also can return false. |
178 * Once false is called, as the service has been destructed, all functions | 189 * Once false is called, as the service has been destructed, all functions |
179 * should never be called afterwords. | 190 * should never be called afterwords. |
180 */ | 191 */ |
181 struct PP_ManifestService_1_0 { | 192 struct PPP_ManifestService_1_0 { |
182 /* Called when ManifestService should be destructed. */ | 193 /* Called when ManifestService should be destructed. */ |
183 PP_Bool (*Quit)(void* user_data); | 194 PP_Bool (*Quit)(void* user_data); |
184 /* Called when PPAPI initialization in the NaCl plugin is finished. */ | 195 /* Called when PPAPI initialization in the NaCl plugin is finished. */ |
185 PP_Bool (*StartupInitializationComplete)(void* user_data); | 196 PP_Bool (*StartupInitializationComplete)(void* user_data); |
| 197 /* Called when irt_open_resource() is invoked in the NaCl plugin. |
| 198 * Upon completion, callback will be invoked with given callback_user_data |
| 199 * and the result file handle (or PP_kInvalidFileHandle on error). */ |
| 200 PP_Bool (*OpenResource)(void* user_data, |
| 201 const char* entry_key, |
| 202 PP_OpenResourceCompletionCallback callback, |
| 203 void* callback_user_data); |
186 }; | 204 }; |
187 | 205 |
188 typedef struct PP_ManifestService_1_0 PP_ManifestService; | 206 typedef struct PPP_ManifestService_1_0 PPP_ManifestService; |
189 | 207 |
190 /* PPB_NaCl_Private */ | 208 /* PPB_NaCl_Private */ |
191 struct PPB_NaCl_Private_1_0 { | 209 struct PPB_NaCl_Private_1_0 { |
192 /* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success | 210 /* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success |
193 * and writes a NaClHandle to imc_handle. Returns PP_EXTERNAL_PLUGIN_FAILED on | 211 * and writes a NaClHandle to imc_handle. Returns PP_EXTERNAL_PLUGIN_FAILED on |
194 * failure. The |enable_ppapi_dev| parameter controls whether GetInterface | 212 * failure. The |enable_ppapi_dev| parameter controls whether GetInterface |
195 * returns 'Dev' interfaces to the NaCl plugin. The |uses_ppapi| flag | 213 * returns 'Dev' interfaces to the NaCl plugin. The |uses_ppapi| flag |
196 * indicates that the nexe run by sel_ldr will use the PPAPI APIs. | 214 * indicates that the nexe run by sel_ldr will use the PPAPI APIs. |
197 * This implies that LaunchSelLdr is run from the main thread. If a nexe | 215 * This implies that LaunchSelLdr is run from the main thread. If a nexe |
198 * does not need PPAPI, then it can run off the main thread. | 216 * does not need PPAPI, then it can run off the main thread. |
(...skipping 12 matching lines...) Expand all Loading... |
211 void (*LaunchSelLdr)( | 229 void (*LaunchSelLdr)( |
212 PP_Instance instance, | 230 PP_Instance instance, |
213 const char* alleged_url, | 231 const char* alleged_url, |
214 PP_Bool uses_irt, | 232 PP_Bool uses_irt, |
215 PP_Bool uses_ppapi, | 233 PP_Bool uses_ppapi, |
216 PP_Bool uses_nonsfi_mode, | 234 PP_Bool uses_nonsfi_mode, |
217 PP_Bool enable_ppapi_dev, | 235 PP_Bool enable_ppapi_dev, |
218 PP_Bool enable_dyncode_syscalls, | 236 PP_Bool enable_dyncode_syscalls, |
219 PP_Bool enable_exception_handling, | 237 PP_Bool enable_exception_handling, |
220 PP_Bool enable_crash_throttling, | 238 PP_Bool enable_crash_throttling, |
221 const struct PP_ManifestService_1_0* manifest_service_interface, | 239 const struct PPP_ManifestService_1_0* manifest_service_interface, |
222 void* manifest_service_user_data, | 240 void* manifest_service_user_data, |
223 void* imc_handle, | 241 void* imc_handle, |
224 struct PP_Var* error_message, | 242 struct PP_Var* error_message, |
225 struct PP_CompletionCallback callback); | 243 struct PP_CompletionCallback callback); |
226 /* This function starts the IPC proxy so the nexe can communicate with the | 244 /* This function starts the IPC proxy so the nexe can communicate with the |
227 * browser. | 245 * browser. |
228 */ | 246 */ |
229 PP_Bool (*StartPpapiProxy)(PP_Instance instance); | 247 PP_Bool (*StartPpapiProxy)(PP_Instance instance); |
230 /* On POSIX systems, this function returns the file descriptor of | 248 /* On POSIX systems, this function returns the file descriptor of |
231 * /dev/urandom. On non-POSIX systems, this function returns 0. | 249 * /dev/urandom. On non-POSIX systems, this function returns 0. |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 struct PP_CompletionCallback callback); | 409 struct PP_CompletionCallback callback); |
392 }; | 410 }; |
393 | 411 |
394 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; | 412 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; |
395 /** | 413 /** |
396 * @} | 414 * @} |
397 */ | 415 */ |
398 | 416 |
399 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ | 417 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ |
400 | 418 |
OLD | NEW |