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

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

Issue 10214007: Add an IPC channel between the NaCl loader process and the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 #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 12
13 #define PPB_NACL_PRIVATE_INTERFACE "PPB_NaCl(Private);0.5" 13 #define PPB_NACL_PRIVATE_INTERFACE "PPB_NaCl(Private);0.5"
14 14
15 struct PPB_NaCl_Private { 15 struct PPB_NaCl_Private {
16 // This function launches NaCl's sel_ldr process. On success, the function 16 // This function launches NaCl's sel_ldr process. On success, the function
17 // returns true, otherwise it returns false. When it returns true, it will 17 // returns true, otherwise it returns false. When it returns true, it will
18 // write |socket_count| nacl::Handles to imc_handles. Unless 18 // write |socket_count| nacl::Handles to imc_handles. |ipc_channel_handle|
19 // will point to information needed to start the IPC proxy. Unless
19 // EnableBackgroundSelLdrLaunch is called, this method must be invoked from 20 // EnableBackgroundSelLdrLaunch is called, this method must be invoked from
20 // the main thread. 21 // the main thread.
21 PP_Bool (*LaunchSelLdr)(PP_Instance instance, 22 PP_Bool (*LaunchSelLdr)(PP_Instance instance,
22 const char* alleged_url, 23 const char* alleged_url,
23 int socket_count, 24 int socket_count,
24 void* imc_handles); 25 void* imc_handles,
26 void** ipc_channel_handle);
25 27
26 // This function starts the PPAPI proxy so the nexe can communicate with the 28 // This function starts the PPAPI proxy so the nexe can communicate with the
27 // browser's renderer process. 29 // browser's renderer process. |ipc_channel_handle| is the pointer returned
28 PP_Bool (*StartPpapiProxy)(PP_Instance instance); 30 // by the call to LaunchSelLdr.
31 PP_Bool (*StartPpapiProxy)(PP_Instance instance,
32 void* ipc_channel_handle);
29 33
30 // On POSIX systems, this function returns the file descriptor of 34 // On POSIX systems, this function returns the file descriptor of
31 // /dev/urandom. On non-POSIX systems, this function returns 0. 35 // /dev/urandom. On non-POSIX systems, this function returns 0.
32 int (*UrandomFD)(void); 36 int (*UrandomFD)(void);
33 37
34 // Whether the Pepper 3D interfaces should be disabled in the NaCl PPAPI 38 // Whether the Pepper 3D interfaces should be disabled in the NaCl PPAPI
35 // proxy. This is so paranoid admins can effectively prevent untrusted shader 39 // proxy. This is so paranoid admins can effectively prevent untrusted shader
36 // code to be processed by the graphics stack. 40 // code to be processed by the graphics stack.
37 bool (*Are3DInterfacesDisabled)(); 41 bool (*Are3DInterfacesDisabled)();
38 42
(...skipping 11 matching lines...) Expand all
50 // usable with NaClSetBrokerDuplicateHandleFunc() without further 54 // usable with NaClSetBrokerDuplicateHandleFunc() without further
51 // wrapping. 55 // wrapping.
52 int (*BrokerDuplicateHandle)(void* source_handle, 56 int (*BrokerDuplicateHandle)(void* source_handle,
53 uint32_t process_id, 57 uint32_t process_id,
54 void** target_handle, 58 void** target_handle,
55 uint32_t desired_access, 59 uint32_t desired_access,
56 uint32_t options); 60 uint32_t options);
57 }; 61 };
58 62
59 #endif // PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ 63 #endif // PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698