diff options
author | jvoung@google.com <jvoung@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-23 22:26:50 +0000 |
---|---|---|
committer | jvoung@google.com <jvoung@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-23 22:26:50 +0000 |
commit | 1787bb4ffda4373742250cdd539ef30d35dcb27f (patch) | |
tree | c37610698927c72661024fb1d690d44c824f2d02 /ppapi | |
parent | 89793070e272006f7ec6101619080812687f38cb (diff) | |
download | chromium_src-1787bb4ffda4373742250cdd539ef30d35dcb27f.zip chromium_src-1787bb4ffda4373742250cdd539ef30d35dcb27f.tar.gz chromium_src-1787bb4ffda4373742250cdd539ef30d35dcb27f.tar.bz2 |
Add a NaCl-Private interface for opening files in DIR_PNACL_COMPONENT.
This will later be used in the NaCl plugin to grab
"llc.nexe", and linker resources for PNaCl directly,
instead of using the URL-downloader interface to get these
from a chrome extension url.
BUG= http://code.google.com/p/nativeclient/issues/detail?id=2365
TEST= pnacl_file_host_unittest (just checks path sanity checks)
Review URL: https://chromiumcodereview.appspot.com/10662006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147968 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/api/private/finish_writing_these/ppb_nacl_private.idl | 9 | ||||
-rw-r--r-- | ppapi/c/private/ppb_nacl_private.h | 8 |
2 files changed, 15 insertions, 2 deletions
diff --git a/ppapi/api/private/finish_writing_these/ppb_nacl_private.idl b/ppapi/api/private/finish_writing_these/ppb_nacl_private.idl index e9047d2..eb324d1 100644 --- a/ppapi/api/private/finish_writing_these/ppb_nacl_private.idl +++ b/ppapi/api/private/finish_writing_these/ppb_nacl_private.idl @@ -6,7 +6,7 @@ /* This file contains NaCl private interfaces. */ /* PPB_NaCl_Private */ -interface PPB_NaCl_Private_0_5 { +interface PPB_NaCl_Private_0_6 { /* This function launches NaCl's sel_ldr process. On success, the function * returns true, otherwise it returns false. When it returns true, it will * write |socket_count| nacl::Handles to imc_handles. @@ -31,4 +31,11 @@ interface PPB_NaCl_Private_0_5 { * code to be processed by the graphics stack. */ bool Are3DInterfacesDisabled(); + + /* Returns a read-only file descriptor of a file rooted in the Pnacl + * component directory, or -1 on error. + * Do we want this to take a completion callback and be async, or + * could we make this happen on another thread? + */ + int32_t GetReadonlyPnaclFd([in] str_t filename); }; diff --git a/ppapi/c/private/ppb_nacl_private.h b/ppapi/c/private/ppb_nacl_private.h index dc7e7a2..3972a9e 100644 --- a/ppapi/c/private/ppb_nacl_private.h +++ b/ppapi/c/private/ppb_nacl_private.h @@ -10,7 +10,7 @@ #include "ppapi/c/pp_resource.h" #include "ppapi/c/pp_stdint.h" -#define PPB_NACL_PRIVATE_INTERFACE "PPB_NaCl(Private);0.5" +#define PPB_NACL_PRIVATE_INTERFACE "PPB_NaCl(Private);0.6" struct PPB_NaCl_Private { // This function launches NaCl's sel_ldr process. On success, the function @@ -54,6 +54,12 @@ struct PPB_NaCl_Private { void** target_handle, uint32_t desired_access, uint32_t options); + + // Returns a read-only file descriptor of a file rooted in the Pnacl + // component directory, or -1 on error. + // Do we want this to take a completion callback and be async, or + // or could we make this happen on another thread? + int (*GetReadonlyPnaclFd)(const char* filename); }; #endif // PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ |