summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/ppb_flash_proxy.cc
diff options
context:
space:
mode:
authoryzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-15 22:56:53 +0000
committeryzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-15 22:56:53 +0000
commit481a4b7f34565ef087c8aa44c8e04f9f0e466b2d (patch)
tree58a27508ef38cecf35d478710ee9039aa9a2cea0 /ppapi/proxy/ppb_flash_proxy.cc
parente5d5b0e8f45962bbb5cba1a6dd9a3b31eadb9429 (diff)
downloadchromium_src-481a4b7f34565ef087c8aa44c8e04f9f0e466b2d.zip
chromium_src-481a4b7f34565ef087c8aa44c8e04f9f0e466b2d.tar.gz
chromium_src-481a4b7f34565ef087c8aa44c8e04f9f0e466b2d.tar.bz2
Add CreateTemporaryFile to PPB_Flash_File_ModuleLocal.
BUG=129807 TEST=None Review URL: https://chromiumcodereview.appspot.com/10534045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142512 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppb_flash_proxy.cc')
-rw-r--r--ppapi/proxy/ppb_flash_proxy.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/ppapi/proxy/ppb_flash_proxy.cc b/ppapi/proxy/ppb_flash_proxy.cc
index a6b7e62..28444e9 100644
--- a/ppapi/proxy/ppb_flash_proxy.cc
+++ b/ppapi/proxy/ppb_flash_proxy.cc
@@ -498,6 +498,25 @@ int32_t PPB_Flash_Proxy::GetDirContents(PP_Instance,
return ppapi::PlatformFileErrorToPepperError(error);
}
+int32_t PPB_Flash_Proxy::CreateTemporaryFile(PP_Instance instance,
+ PP_FileHandle* file) {
+ if (!file)
+ return PP_ERROR_BADARGUMENT;
+
+ base::PlatformFileError error;
+ IPC::PlatformFileForTransit transit_file;
+
+ if (PluginGlobals::Get()->plugin_proxy_delegate()->SendToBrowser(
+ new PepperFileMsg_CreateTemporaryFile(&error, &transit_file))) {
+ *file = IPC::PlatformFileForTransitToPlatformFile(transit_file);
+ } else {
+ error = base::PLATFORM_FILE_ERROR_FAILED;
+ *file = base::kInvalidPlatformFileValue;
+ }
+
+ return ppapi::PlatformFileErrorToPepperError(error);
+}
+
int32_t PPB_Flash_Proxy::OpenFileRef(PP_Instance instance,
PP_Resource file_ref_id,
int32_t mode,