Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Unified Diff: ppapi/thunk/ppb_flash_file_modulelocal_thunk.cc

Issue 10534045: Add CreateTemporaryFile to PPB_Flash_File_ModuleLocal. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/thunk/ppb_flash_api.h ('k') | webkit/plugins/ppapi/mock_plugin_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ppapi/thunk/ppb_flash_api.h ('k') | webkit/plugins/ppapi/mock_plugin_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698