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

Unified Diff: ppapi/proxy/resource_message_params.cc

Issue 11359097: Refactored the PPB_Flash_File_ModuleLocal/FileRef to the new ppapi resource model (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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/resource_message_params.h ('k') | ppapi/proxy/serialized_structs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/resource_message_params.cc
diff --git a/ppapi/proxy/resource_message_params.cc b/ppapi/proxy/resource_message_params.cc
index aaca8c9a6f4da0f4e51fffd5ef26d75a4ea63590..49b6328bdfe61e3f38aba74624ecd03bd0515d5f 100644
--- a/ppapi/proxy/resource_message_params.cc
+++ b/ppapi/proxy/resource_message_params.cc
@@ -91,6 +91,17 @@ bool ResourceMessageParams::TakeSocketHandleAtIndex(
return true;
}
+bool ResourceMessageParams::TakeFileHandleAtIndex(
+ size_t index,
+ IPC::PlatformFileForTransit* handle) const {
+ SerializedHandle serialized = TakeHandleOfTypeAtIndex(
+ index, SerializedHandle::FILE);
+ if (!serialized.is_file())
+ return false;
+ *handle = serialized.descriptor();
+ return true;
+}
+
void ResourceMessageParams::TakeAllSharedMemoryHandles(
std::vector<base::SharedMemoryHandle>* handles) const {
for (size_t i = 0; i < handles_->data().size(); ++i) {
« no previous file with comments | « ppapi/proxy/resource_message_params.h ('k') | ppapi/proxy/serialized_structs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698