diff options
Diffstat (limited to 'ppapi/thunk/ppb_flash_file_modulelocal_thunk.cc')
-rw-r--r-- | ppapi/thunk/ppb_flash_file_modulelocal_thunk.cc | 40 |
1 files changed, 33 insertions, 7 deletions
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 |