diff options
author | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-17 21:55:40 +0000 |
---|---|---|
committer | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-17 21:55:40 +0000 |
commit | e0414ed4370f69508a037631300fd9f3db434891 (patch) | |
tree | 10c7dc194d032153622c593f2435a74d671fd735 /webkit/plugins | |
parent | 3b83eb83c7ac6c369b0de4081edb21bc98f80127 (diff) | |
download | chromium_src-e0414ed4370f69508a037631300fd9f3db434891.zip chromium_src-e0414ed4370f69508a037631300fd9f3db434891.tar.gz chromium_src-e0414ed4370f69508a037631300fd9f3db434891.tar.bz2 |
Add LaunchSelLdr and UrandomFD to PPAPI
LaunchSelLdr just calls through to the webkit_glue backend, which calls through a bunch more layers of abstraction for us.
UrandomFD returns the file descriptor of /dev/urandom (on Posix), which NaCl uses for some purpose by can't get directly because of the sandbox.
Review URL: http://codereview.chromium.org/6023003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69578 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins')
-rw-r--r-- | webkit/plugins/ppapi/ppb_nacl_util_private_impl.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/webkit/plugins/ppapi/ppb_nacl_util_private_impl.cc b/webkit/plugins/ppapi/ppb_nacl_util_private_impl.cc index 72dc76a..df937cb 100644 --- a/webkit/plugins/ppapi/ppb_nacl_util_private_impl.cc +++ b/webkit/plugins/ppapi/ppb_nacl_util_private_impl.cc @@ -4,21 +4,35 @@ #include "webkit/plugins/ppapi/ppb_nacl_util_private_impl.h" +#include "base/rand_util_c.h" #include "ppapi/c/private/ppb_nacl_util_private.h" +#include "webkit/glue/webkit_glue.h" namespace webkit { namespace ppapi { namespace { -int32_t LaunchSelLdr(PP_Resource file_io) { +bool LaunchSelLdr(const char* alleged_url, int socket_count, + void* imc_handles, void* nacl_process_handle, + int* nacl_process_id) { + return webkit_glue::LaunchSelLdr(alleged_url, socket_count, imc_handles, + nacl_process_handle, nacl_process_id); +} + +int UrandomFD(void) { +#if defined(OS_POSIX) + return GetUrandomFD(); +#else return 0; +#endif } } // namespace const PPB_NaClUtil_Private ppb_nacl_util = { &LaunchSelLdr, + &UrandomFD, }; // static |