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

Unified Diff: ppapi/proxy/ppb_flash_proxy.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/proxy/ppb_flash_proxy.h ('k') | ppapi/tests/test_flash_file.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_flash_proxy.cc
diff --git a/ppapi/proxy/ppb_flash_proxy.cc b/ppapi/proxy/ppb_flash_proxy.cc
index a6b7e62569e46e56b7c80060586543040f16617b..28444e973470e93a723081fa4e2bf8082e5d0c30 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,
« no previous file with comments | « ppapi/proxy/ppb_flash_proxy.h ('k') | ppapi/tests/test_flash_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698