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

Unified Diff: ppapi/proxy/file_io_resource.h

Issue 18063005: Do PPB_FileIO Query and Read in the plugin process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a note explaining buffer transfer for DoRead. Created 7 years, 5 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: ppapi/proxy/file_io_resource.h
diff --git a/ppapi/proxy/file_io_resource.h b/ppapi/proxy/file_io_resource.h
index a2b928dcd840b81958ffab3bbb32ac3435c97b92..44eb8fec5aef424499eb65c9c9c4f86780815e11 100644
--- a/ppapi/proxy/file_io_resource.h
+++ b/ppapi/proxy/file_io_resource.h
@@ -71,26 +71,30 @@ class PPAPI_PROXY_EXPORT FileIOResource
int32_t bytes_to_read,
const PP_ArrayOutput& array_output,
scoped_refptr<TrackedCallback> callback);
+ void CloseFileHandle();
- // Handlers of reply messages. Note that all of them have a callback
- // parameters bound when call to the host.
+ // Reply message handlers for operations that are done in the host.
void OnPluginMsgGeneralComplete(scoped_refptr<TrackedCallback> callback,
const ResourceMessageReplyParams& params);
void OnPluginMsgOpenFileComplete(scoped_refptr<TrackedCallback> callback,
const ResourceMessageReplyParams& params);
- void OnPluginMsgQueryComplete(scoped_refptr<TrackedCallback> callback,
- PP_FileInfo* output_info_,
- const ResourceMessageReplyParams& params,
- const PP_FileInfo& info);
- void OnPluginMsgReadComplete(scoped_refptr<TrackedCallback> callback,
- PP_ArrayOutput array_output,
- const ResourceMessageReplyParams& params,
- const std::string& data);
void OnPluginMsgRequestOSFileHandleComplete(
scoped_refptr<TrackedCallback> callback,
PP_FileHandle* output_handle,
const ResourceMessageReplyParams& params);
+ // Reply message handlers for operations that are done in the plugin.
+ void OnQueryComplete(scoped_refptr<TrackedCallback> callback,
+ PP_FileInfo* output_info,
+ base::PlatformFileError error_code,
+ const base::PlatformFileInfo& file_info);
+ void OnReadComplete(scoped_refptr<TrackedCallback> callback,
+ PP_ArrayOutput array_output,
+ base::PlatformFileError error_code,
+ const char* data, int bytes_read);
+
+ PP_FileHandle file_handle_;
+ PP_FileSystemType file_system_type_;
FileIOStateManager state_manager_;
DISALLOW_COPY_AND_ASSIGN(FileIOResource);

Powered by Google App Engine
This is Rietveld 408576698