Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: ppapi/c/private/ppb_nacl_private.h

Issue 249183004: Implement open_resource in non-SFI mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 23 12:56:55 2014. */ 6 /* From private/ppb_nacl_private.idl modified Wed Apr 23 23:34:48 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 PPB_MANIFESTSERVICE_INTERFACE_1_0 "PPB_ManifestService;1.0"
19 #define PP_MANIFESTSERVICE_INTERFACE PP_MANIFESTSERVICE_INTERFACE_1_0 19 #define PPB_MANIFESTSERVICE_INTERFACE PPB_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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 * @addtogroup Interfaces 171 * @addtogroup Interfaces
172 * @{ 172 * @{
173 */ 173 */
174 /* ManifestService to support irt_open_resource() function. 174 /* ManifestService to support irt_open_resource() function.
175 * All functions of the service should have PP_Bool return value. It represents 175 * 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 176 * whether the service is still alive or not. Trivially Quit() should always
177 * return false. However, other functions also can return false. 177 * return false. However, other functions also can return false.
178 * Once false is called, as the service has been destructed, all functions 178 * Once false is called, as the service has been destructed, all functions
179 * should never be called afterwords. 179 * should never be called afterwords.
180 */ 180 */
181 struct PP_ManifestService_1_0 { 181 struct PPB_ManifestService_1_0 {
182 /* Called when ManifestService should be destructed. */ 182 /* Called when ManifestService should be destructed. */
183 PP_Bool (*Quit)(void* user_data); 183 PP_Bool (*Quit)(void* user_data);
184 /* Called when PPAPI initialization in the NaCl plugin is finished. */ 184 /* Called when PPAPI initialization in the NaCl plugin is finished. */
185 PP_Bool (*StartupInitializationComplete)(void* user_data); 185 PP_Bool (*StartupInitializationComplete)(void* user_data);
186 /* Called when irt_open_resource() is invoked in the NaCl plugin.
187 * Upon completion, callback will be invoked. If the OpenResource() returns
188 * PP_FALSE, callback will never be called. */
189 PP_Bool (*OpenResource)(void* user_data,
190 const char* entry_key,
191 PP_FileHandle* file,
192 struct PP_CompletionCallback callback);
186 }; 193 };
187 194
188 typedef struct PP_ManifestService_1_0 PP_ManifestService; 195 typedef struct PPB_ManifestService_1_0 PPB_ManifestService;
189 196
190 /* PPB_NaCl_Private */ 197 /* PPB_NaCl_Private */
191 struct PPB_NaCl_Private_1_0 { 198 struct PPB_NaCl_Private_1_0 {
192 /* Launches NaCl's sel_ldr process. Returns PP_EXTERNAL_PLUGIN_OK on success 199 /* 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 200 * and writes a NaClHandle to imc_handle. Returns PP_EXTERNAL_PLUGIN_FAILED on
194 * failure. The |enable_ppapi_dev| parameter controls whether GetInterface 201 * failure. The |enable_ppapi_dev| parameter controls whether GetInterface
195 * returns 'Dev' interfaces to the NaCl plugin. The |uses_ppapi| flag 202 * 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. 203 * 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 204 * 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. 205 * does not need PPAPI, then it can run off the main thread.
(...skipping 12 matching lines...) Expand all
211 void (*LaunchSelLdr)( 218 void (*LaunchSelLdr)(
212 PP_Instance instance, 219 PP_Instance instance,
213 const char* alleged_url, 220 const char* alleged_url,
214 PP_Bool uses_irt, 221 PP_Bool uses_irt,
215 PP_Bool uses_ppapi, 222 PP_Bool uses_ppapi,
216 PP_Bool uses_nonsfi_mode, 223 PP_Bool uses_nonsfi_mode,
217 PP_Bool enable_ppapi_dev, 224 PP_Bool enable_ppapi_dev,
218 PP_Bool enable_dyncode_syscalls, 225 PP_Bool enable_dyncode_syscalls,
219 PP_Bool enable_exception_handling, 226 PP_Bool enable_exception_handling,
220 PP_Bool enable_crash_throttling, 227 PP_Bool enable_crash_throttling,
221 const struct PP_ManifestService_1_0* manifest_service_interface, 228 const struct PPB_ManifestService_1_0* manifest_service_interface,
222 void* manifest_service_user_data, 229 void* manifest_service_user_data,
223 void* imc_handle, 230 void* imc_handle,
224 struct PP_Var* error_message, 231 struct PP_Var* error_message,
225 struct PP_CompletionCallback callback); 232 struct PP_CompletionCallback callback);
226 /* This function starts the IPC proxy so the nexe can communicate with the 233 /* This function starts the IPC proxy so the nexe can communicate with the
227 * browser. 234 * browser.
228 */ 235 */
229 PP_Bool (*StartPpapiProxy)(PP_Instance instance); 236 PP_Bool (*StartPpapiProxy)(PP_Instance instance);
230 /* On POSIX systems, this function returns the file descriptor of 237 /* On POSIX systems, this function returns the file descriptor of
231 * /dev/urandom. On non-POSIX systems, this function returns 0. 238 * /dev/urandom. On non-POSIX systems, this function returns 0.
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 void (*ProcessNaClManifest)(PP_Instance instance, const char* program_url); 387 void (*ProcessNaClManifest)(PP_Instance instance, const char* program_url);
381 }; 388 };
382 389
383 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private; 390 typedef struct PPB_NaCl_Private_1_0 PPB_NaCl_Private;
384 /** 391 /**
385 * @} 392 * @}
386 */ 393 */
387 394
388 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */ 395 #endif /* PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ */
389 396
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698