| Index: ppapi/thunk/ppb_flash_file_modulelocal_thunk.cc
|
| diff --git a/ppapi/thunk/ppb_flash_file_modulelocal_thunk.cc b/ppapi/thunk/ppb_flash_file_modulelocal_thunk.cc
|
| index 6338779f5d3c2eb5ca8bca9a91191f8fee8e877c..7e9678a91e76d23e8777c6884152a75a3bf2992f 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
|
|
|