Chromium Code Reviews| 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, |