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

Unified Diff: webkit/plugins/ppapi/ppb_flash_impl.cc

Issue 10534045: Add CreateTemporaryFile to PPB_Flash_File_ModuleLocal. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove input dir path and output file name 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
Index: webkit/plugins/ppapi/ppb_flash_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_flash_impl.cc b/webkit/plugins/ppapi/ppb_flash_impl.cc
index 8b595ff594bc801603df41850222f41dc16d484d..0297ee76320a55613505e6beb6da6c2f46e05626 100644
--- a/webkit/plugins/ppapi/ppb_flash_impl.cc
+++ b/webkit/plugins/ppapi/ppb_flash_impl.cc
@@ -523,6 +523,24 @@ int32_t PPB_Flash_Impl::GetDirContents(PP_Instance pp_instance,
return PP_OK;
}
+int32_t PPB_Flash_Impl::CreateTemporaryFile(PP_Instance instance,
+ PP_FileHandle* file) {
+ if (!file)
+ return PP_ERROR_BADARGUMENT;
+
+ PluginInstance* plugin_instance = HostGlobals::Get()->GetInstance(instance);
+ if (!plugin_instance) {
+ *file = PP_kInvalidFileHandle;
+ return PP_ERROR_FAILED;
+ }
+
+ base::PlatformFile temp_file = base::kInvalidPlatformFileValue;
viettrungluu 2012/06/11 17:31:46 Why do you need temp_file at all?
yzshen1 2012/06/12 23:53:06 Done. On 2012/06/11 17:31:46, viettrungluu wrote:
+ base::PlatformFileError result =
+ plugin_instance->delegate()->CreateTemporaryFile(&temp_file);
+ *file = temp_file;
+ return ::ppapi::PlatformFileErrorToPepperError(result);
+}
+
int32_t PPB_Flash_Impl::OpenFileRef(PP_Instance pp_instance,
PP_Resource file_ref_id,
int32_t mode,

Powered by Google App Engine
This is Rietveld 408576698