diff options
author | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-15 22:56:53 +0000 |
---|---|---|
committer | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-15 22:56:53 +0000 |
commit | 481a4b7f34565ef087c8aa44c8e04f9f0e466b2d (patch) | |
tree | 58a27508ef38cecf35d478710ee9039aa9a2cea0 /ppapi/thunk | |
parent | e5d5b0e8f45962bbb5cba1a6dd9a3b31eadb9429 (diff) | |
download | chromium_src-481a4b7f34565ef087c8aa44c8e04f9f0e466b2d.zip chromium_src-481a4b7f34565ef087c8aa44c8e04f9f0e466b2d.tar.gz chromium_src-481a4b7f34565ef087c8aa44c8e04f9f0e466b2d.tar.bz2 |
Add CreateTemporaryFile to PPB_Flash_File_ModuleLocal.
BUG=129807
TEST=None
Review URL: https://chromiumcodereview.appspot.com/10534045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142512 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk')
-rw-r--r-- | ppapi/thunk/interfaces_ppb_private_flash.h | 7 | ||||
-rw-r--r-- | ppapi/thunk/ppb_flash_api.h | 2 | ||||
-rw-r--r-- | ppapi/thunk/ppb_flash_file_modulelocal_thunk.cc | 40 |
3 files changed, 40 insertions, 9 deletions
diff --git a/ppapi/thunk/interfaces_ppb_private_flash.h b/ppapi/thunk/interfaces_ppb_private_flash.h index c0bd0df..fb5817b 100644 --- a/ppapi/thunk/interfaces_ppb_private_flash.h +++ b/ppapi/thunk/interfaces_ppb_private_flash.h @@ -34,8 +34,11 @@ PROXIED_IFACE(PPB_Flash, PPB_FLASH_CLIPBOARD_INTERFACE_4_0, PPB_Flash_Clipboard_4_0) PROXIED_IFACE(PPB_Flash, - PPB_FLASH_FILE_MODULELOCAL_INTERFACE, - PPB_Flash_File_ModuleLocal) + PPB_FLASH_FILE_MODULELOCAL_INTERFACE_2_0, + PPB_Flash_File_ModuleLocal_2_0) +PROXIED_IFACE(PPB_Flash, + PPB_FLASH_FILE_MODULELOCAL_INTERFACE_3_0, + PPB_Flash_File_ModuleLocal_3_0) PROXIED_IFACE(PPB_Flash, PPB_FLASH_FILE_FILEREF_INTERFACE, PPB_Flash_File_FileRef) diff --git a/ppapi/thunk/ppb_flash_api.h b/ppapi/thunk/ppb_flash_api.h index 0fdcc68..823740e 100644 --- a/ppapi/thunk/ppb_flash_api.h +++ b/ppapi/thunk/ppb_flash_api.h @@ -82,6 +82,8 @@ class PPAPI_THUNK_EXPORT PPB_Flash_API { PP_DirContents_Dev** contents) = 0; virtual void FreeDirContents(PP_Instance instance, PP_DirContents_Dev* contents) = 0; + virtual int32_t CreateTemporaryFile(PP_Instance instance, + PP_FileHandle* file) = 0; // FlashFile_FileRef. virtual int32_t OpenFileRef(PP_Instance instance, diff --git a/ppapi/thunk/ppb_flash_file_modulelocal_thunk.cc b/ppapi/thunk/ppb_flash_file_modulelocal_thunk.cc index 6338779..7e9678a 100644 --- a/ppapi/thunk/ppb_flash_file_modulelocal_thunk.cc +++ b/ppapi/thunk/ppb_flash_file_modulelocal_thunk.cc @@ -87,13 +87,20 @@ int32_t GetDirContents(PP_Instance instance, void FreeDirContents(PP_Instance instance, PP_DirContents_Dev* contents) { EnterInstance enter(instance); - if (enter.succeeded()) { - return enter.functions()->GetFlashAPI()->FreeDirContents(instance, - contents); - } + if (enter.succeeded()) + enter.functions()->GetFlashAPI()->FreeDirContents(instance, contents); +} + +int32_t CreateTemporaryFile(PP_Instance instance, PP_FileHandle* file) { + EnterInstance enter(instance); + if (enter.failed()) + return PP_ERROR_BADARGUMENT; + + *file = PP_kInvalidFileHandle; + return enter.functions()->GetFlashAPI()->CreateTemporaryFile(instance, file); } -const PPB_Flash_File_ModuleLocal g_ppb_flash_file_modulelocal_thunk = { +const PPB_Flash_File_ModuleLocal_2_0 g_ppb_flash_file_modulelocal_thunk_2_0 = { &CreateThreadAdapterForInstance, &ClearThreadAdapterForInstance, &OpenFile, @@ -105,10 +112,29 @@ const PPB_Flash_File_ModuleLocal g_ppb_flash_file_modulelocal_thunk = { &FreeDirContents }; +const PPB_Flash_File_ModuleLocal_3_0 g_ppb_flash_file_modulelocal_thunk_3_0 = { + &CreateThreadAdapterForInstance, + &ClearThreadAdapterForInstance, + &OpenFile, + &RenameFile, + &DeleteFileOrDir, + &CreateDir, + &QueryFile, + &GetDirContents, + &FreeDirContents, + &CreateTemporaryFile +}; + } // namespace -const PPB_Flash_File_ModuleLocal* GetPPB_Flash_File_ModuleLocal_Thunk() { - return &g_ppb_flash_file_modulelocal_thunk; +const PPB_Flash_File_ModuleLocal_2_0* + GetPPB_Flash_File_ModuleLocal_2_0_Thunk() { + return &g_ppb_flash_file_modulelocal_thunk_2_0; +} + +const PPB_Flash_File_ModuleLocal_3_0* + GetPPB_Flash_File_ModuleLocal_3_0_Thunk() { + return &g_ppb_flash_file_modulelocal_thunk_3_0; } } // namespace thunk |