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

Side by Side Diff: src/shared/imc/nacl_imc_c.h

Issue 9960060: Handle-passing: Allow a handle-passing function to be supplied by Chromium (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Add "broker" prefix to name Created 8 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
« no previous file with comments | « no previous file | src/shared/imc/win/nacl_imc.cc » ('j') | src/shared/imc/win/nacl_imc.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 7
8 /* 8 /*
9 * Nacl inter-module communication primitives. 9 * Nacl inter-module communication primitives.
10 * Primitive NaCl socket and shared memory functions which provide a portable 10 * Primitive NaCl socket and shared memory functions which provide a portable
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 * kInvalidHandle on failure. 229 * kInvalidHandle on failure.
230 */ 230 */
231 typedef NaClHandle (*NaClCreateMemoryObjectFunc)(size_t length, int executable); 231 typedef NaClHandle (*NaClCreateMemoryObjectFunc)(size_t length, int executable);
232 232
233 /* 233 /*
234 * This allows an alternative implementation of NaClCreateMemoryObject() 234 * This allows an alternative implementation of NaClCreateMemoryObject()
235 * to be provided that works in an outer sandbox. 235 * to be provided that works in an outer sandbox.
236 */ 236 */
237 void NaClSetCreateMemoryObjectFunc(NaClCreateMemoryObjectFunc func); 237 void NaClSetCreateMemoryObjectFunc(NaClCreateMemoryObjectFunc func);
238 238
239 #if NACL_WINDOWS
240 /*
241 * Type of function supplied to NaClSetBrokerDuplicateHandleFunc().
242 * Such a function copies a Windows handle into the target process
243 * with the given process ID. This is a more restricted version of
244 * Windows' DuplicateHandle() that can send handles but not retrieve
245 * them.
246 */
247 typedef int (*NaClBrokerDuplicateHandleFunc)(NaClHandle source_handle,
248 uint32_t process_id,
sehr (please use chromium) 2012/04/10 21:27:35 perhaps "target_process_id" just for emphasis.
Mark Seaborn 2012/04/10 21:47:23 Done.
249 NaClHandle *target_handle,
250 uint32_t desired_access,
251 uint32_t options);
252
253 /*
254 * This allows a replacement for Windows' DuplicateHandle() to be
255 * provided that works in an outer sandbox.
256 */
257 void NaClSetBrokerDuplicateHandleFunc(NaClBrokerDuplicateHandleFunc func);
258 #endif
259
239 /* 260 /*
240 * Creates a memory object of length bytes. 261 * Creates a memory object of length bytes.
241 * 262 *
242 * NaClCreateMemoryObject() returns a handle of the newly created 263 * NaClCreateMemoryObject() returns a handle of the newly created
243 * memory object on success, and NACL_INVALID_HANDLE on failure. 264 * memory object on success, and NACL_INVALID_HANDLE on failure.
244 * length must be a multiple of allocation granularity given by 265 * length must be a multiple of allocation granularity given by
245 * NACL_MAP_PAGESIZE in nacl_config.h. 266 * NACL_MAP_PAGESIZE in nacl_config.h.
246 * 267 *
247 * executable: Whether the memory object needs to be mappable as 268 * executable: Whether the memory object needs to be mappable as
248 * executable. (This is significant only on Mac OS X.) 269 * executable. (This is significant only on Mac OS X.)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 * 304 *
284 * NaClUnmap() returns 0 on success, and -1 on failure. 305 * NaClUnmap() returns 0 on success, and -1 on failure.
285 */ 306 */
286 int NaClUnmap(void* start, size_t length); 307 int NaClUnmap(void* start, size_t length);
287 308
288 #ifdef __cplusplus 309 #ifdef __cplusplus
289 } 310 }
290 #endif /* __cplusplus */ 311 #endif /* __cplusplus */
291 312
292 #endif /* NATIVE_CLIENT_SRC_SHARED_IMC_NACL_IMC_C_H_ */ 313 #endif /* NATIVE_CLIENT_SRC_SHARED_IMC_NACL_IMC_C_H_ */
OLDNEW
« no previous file with comments | « no previous file | src/shared/imc/win/nacl_imc.cc » ('j') | src/shared/imc/win/nacl_imc.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698