diff options
author | nhiroki@chromium.org <nhiroki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-13 11:41:40 +0000 |
---|---|---|
committer | nhiroki@chromium.org <nhiroki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-13 11:41:40 +0000 |
commit | 7d0c1d8224d6a1ae41ffa6195cdf13d70f4bd437 (patch) | |
tree | 9abeed53de0f24f31400904b5adbd9ff52f065bc /ppapi/thunk | |
parent | 015e37054a505efcdff6823c31fceca470416270 (diff) | |
download | chromium_src-7d0c1d8224d6a1ae41ffa6195cdf13d70f4bd437.zip chromium_src-7d0c1d8224d6a1ae41ffa6195cdf13d70f4bd437.tar.gz chromium_src-7d0c1d8224d6a1ae41ffa6195cdf13d70f4bd437.tar.bz2 |
Implement Pepper proxy for PPB_DirectoryReader
This patch includes:
- Adding proxy implementation (DircetoryReaderResource and PepperDirectoryReaderHost)
- Merging PPB_DirectoryReader_impl into PepperDirectoryReaderHost
BUG=106129
TEST=browser_tests --gtest_filter=\*DirectoryReader\*
Review URL: https://chromiumcodereview.appspot.com/11958033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182189 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk')
-rw-r--r-- | ppapi/thunk/interfaces_ppb_public_dev.h | 5 | ||||
-rw-r--r-- | ppapi/thunk/ppb_directory_reader_thunk.cc | 7 | ||||
-rw-r--r-- | ppapi/thunk/resource_creation_api.h | 4 |
3 files changed, 10 insertions, 6 deletions
diff --git a/ppapi/thunk/interfaces_ppb_public_dev.h b/ppapi/thunk/interfaces_ppb_public_dev.h index 3bd6e56..f45a138 100644 --- a/ppapi/thunk/interfaces_ppb_public_dev.h +++ b/ppapi/thunk/interfaces_ppb_public_dev.h @@ -36,7 +36,6 @@ PROXIED_IFACE(PPB_Instance, PPB_TRACE_EVENT_DEV_INTERFACE_0_1, #if !defined(OS_NACL) PROXIED_API(PPB_Buffer) -UNPROXIED_API(PPB_DirectoryReader) UNPROXIED_API(PPB_Scrollbar) PROXIED_API(PPB_VideoDecoder) UNPROXIED_API(PPB_Widget) @@ -53,8 +52,8 @@ PROXIED_IFACE(PPB_Graphics3D, PPB_GLESChromiumTextureMapping_Dev_0_1) PROXIED_IFACE(NoAPIName, PPB_CRYPTO_DEV_INTERFACE_0_1, PPB_Crypto_Dev_0_1) PROXIED_IFACE(NoAPIName, PPB_DEVICEREF_DEV_INTERFACE_0_1, PPB_DeviceRef_Dev_0_1) -UNPROXIED_IFACE(PPB_DirectoryReader, PPB_DIRECTORYREADER_DEV_INTERFACE_0_5, - PPB_DirectoryReader_Dev_0_5) +PROXIED_IFACE(NoAPIName, PPB_DIRECTORYREADER_DEV_INTERFACE_0_5, + PPB_DirectoryReader_Dev_0_5) PROXIED_IFACE(NoAPIName, PPB_GRAPHICS2D_DEV_INTERFACE_0_1, PPB_Graphics2D_Dev_0_1) PROXIED_IFACE(PPB_Instance, PPB_CHAR_SET_DEV_INTERFACE_0_4, PPB_CharSet_Dev_0_4) diff --git a/ppapi/thunk/ppb_directory_reader_thunk.cc b/ppapi/thunk/ppb_directory_reader_thunk.cc index 8ff54e9..eaa7c2d 100644 --- a/ppapi/thunk/ppb_directory_reader_thunk.cc +++ b/ppapi/thunk/ppb_directory_reader_thunk.cc @@ -5,6 +5,7 @@ #include "ppapi/c/dev/ppb_directory_reader_dev.h" #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/pp_errors.h" +#include "ppapi/shared_impl/proxy_lock.h" #include "ppapi/shared_impl/tracked_callback.h" #include "ppapi/thunk/enter.h" #include "ppapi/thunk/thunk.h" @@ -17,14 +18,16 @@ namespace thunk { namespace { PP_Resource Create(PP_Resource directory_ref) { + ppapi::ProxyAutoLock lock; Resource* object = PpapiGlobals::Get()->GetResourceTracker()->GetResource(directory_ref); if (!object) return 0; - EnterResourceCreation enter(object->pp_instance()); + EnterResourceCreationNoLock enter(object->pp_instance()); if (enter.failed()) return 0; - return enter.functions()->CreateDirectoryReader(directory_ref); + return enter.functions()->CreateDirectoryReader( + object->pp_instance(), directory_ref); } PP_Bool IsDirectoryReader(PP_Resource resource) { diff --git a/ppapi/thunk/resource_creation_api.h b/ppapi/thunk/resource_creation_api.h index b8b6a66..47c1114 100644 --- a/ppapi/thunk/resource_creation_api.h +++ b/ppapi/thunk/resource_creation_api.h @@ -147,7 +147,9 @@ class ResourceCreationAPI { PP_Instance instance, const PP_BrowserFont_Trusted_Description* description) = 0; virtual PP_Resource CreateBuffer(PP_Instance instance, uint32_t size) = 0; - virtual PP_Resource CreateDirectoryReader(PP_Resource directory_ref) = 0; + virtual PP_Resource CreateDirectoryReader( + PP_Instance instance, + PP_Resource directory_ref) = 0; virtual PP_Resource CreateFlashDeviceID(PP_Instance instance) = 0; virtual PP_Resource CreateFlashFontFile( PP_Instance instance, |