diff options
author | hamaji@chromium.org <hamaji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-01 16:51:13 +0000 |
---|---|---|
committer | hamaji@chromium.org <hamaji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-01 16:51:13 +0000 |
commit | 8f96cef7e737970b9e16c97de788daaa5fb3181a (patch) | |
tree | 31887c9690fdc4ae20edb89f94745bc2310b665a /ppapi/native_client | |
parent | 0b4468ed16cf93bac23d5abf3ef39e400665d694 (diff) | |
download | chromium_src-8f96cef7e737970b9e16c97de788daaa5fb3181a.zip chromium_src-8f96cef7e737970b9e16c97de788daaa5fb3181a.tar.gz chromium_src-8f96cef7e737970b9e16c97de788daaa5fb3181a.tar.bz2 |
Unlike GetOSFileDescriptor, this API is asynchronous.
Both GetOSFileDescriptor and RequestOSFileHandle use GetOSFileDescriptor
chrome IPC for now. I'm planning to remove call sites of
GetOSFileDescriptor PPAPI and rename GetOSFileDescriptor chrome IPC to
RequestOSFileHandle.
- Add --allow-get-os-file-handle-api. With this flag,
1. browser_tests can test this API and 2. we can use this API even
before this issue is resolved: http://crbug.com/224123
- Add TestRequestOSFileHandle in FileIO. This checks if read, write,
lseek, and mmap work for FD fetched by this API.
- PepperFileIOHost::OnHostMsgGetOSFileDescriptor use
ShareHandleWithRemote to pass a file handle
- Fix ShareHandleWithRemote for in-process API
BUG=183015
TEST=trybots, browser_tests
Review URL: https://chromiumcodereview.appspot.com/13032002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191616 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/native_client')
-rw-r--r-- | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c index 758cb52..4f76f47 100644 --- a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c +++ b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c @@ -77,6 +77,7 @@ #include "ppapi/c/ppp_messaging.h" #include "ppapi/c/ppp_mouse_lock.h" #include "ppapi/c/private/ppb_content_decryptor_private.h" +#include "ppapi/c/private/ppb_file_io_private.h" #include "ppapi/c/private/ppb_file_ref_private.h" #include "ppapi/c/private/ppb_flash.h" #include "ppapi/c/private/ppb_flash_clipboard.h" @@ -233,6 +234,7 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_VideoDecoder_Dev_0_11; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_Widget_Dev_0_2; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_Zoom_Dev_0_3; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_6; +static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileIO_Private_0_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileRefPrivate_0_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_12_4; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Flash_12_5; @@ -2429,6 +2431,16 @@ void Pnacl_M24_PPB_ContentDecryptor_Private_DeliverSamples(PP_Instance instance, /* End wrapper methods for PPB_ContentDecryptor_Private_0_6 */ +/* Begin wrapper methods for PPB_FileIO_Private_0_1 */ + +static __attribute__((pnaclcall)) +int32_t Pnacl_M28_PPB_FileIO_Private_RequestOSFileHandle(PP_Resource file_io, PP_FileHandle* handle, struct PP_CompletionCallback callback) { + const struct PPB_FileIO_Private_0_1 *iface = Pnacl_WrapperInfo_PPB_FileIO_Private_0_1.real_iface; + return iface->RequestOSFileHandle(file_io, handle, callback); +} + +/* End wrapper methods for PPB_FileIO_Private_0_1 */ + /* Begin wrapper methods for PPB_FileRefPrivate_0_1 */ static __attribute__((pnaclcall)) @@ -4356,6 +4368,10 @@ struct PPB_ContentDecryptor_Private_0_6 Pnacl_Wrappers_PPB_ContentDecryptor_Priv .DeliverSamples = (void (*)(PP_Instance instance, PP_Resource audio_frames, const struct PP_DecryptedBlockInfo* decrypted_block_info))&Pnacl_M24_PPB_ContentDecryptor_Private_DeliverSamples }; +struct PPB_FileIO_Private_0_1 Pnacl_Wrappers_PPB_FileIO_Private_0_1 = { + .RequestOSFileHandle = (int32_t (*)(PP_Resource file_io, PP_FileHandle* handle, struct PP_CompletionCallback callback))&Pnacl_M28_PPB_FileIO_Private_RequestOSFileHandle +}; + struct PPB_FileRefPrivate_0_1 Pnacl_Wrappers_PPB_FileRefPrivate_0_1 = { .GetAbsolutePath = (struct PP_Var (*)(PP_Resource file_ref))&Pnacl_M15_PPB_FileRefPrivate_GetAbsolutePath }; @@ -5281,6 +5297,12 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_ .real_iface = NULL }; +static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileIO_Private_0_1 = { + .iface_macro = PPB_FILEIO_PRIVATE_INTERFACE_0_1, + .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_FileIO_Private_0_1, + .real_iface = NULL +}; + static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileRefPrivate_0_1 = { .iface_macro = PPB_FILEREFPRIVATE_INTERFACE_0_1, .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_FileRefPrivate_0_1, @@ -5606,6 +5628,7 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = { &Pnacl_WrapperInfo_PPB_Widget_Dev_0_4, &Pnacl_WrapperInfo_PPB_Zoom_Dev_0_2, &Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_6, + &Pnacl_WrapperInfo_PPB_FileIO_Private_0_1, &Pnacl_WrapperInfo_PPB_FileRefPrivate_0_1, &Pnacl_WrapperInfo_PPB_Flash_12_4, &Pnacl_WrapperInfo_PPB_Flash_12_5, |