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

Unified Diff: webkit/plugins/ppapi/ppb_file_io_impl.h

Issue 10081020: PPAPI: Make blocking completion callbacks work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: export AssertLockHeld 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 | « webkit/plugins/ppapi/ppb_file_chooser_impl.cc ('k') | webkit/plugins/ppapi/ppb_file_io_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_file_io_impl.h
diff --git a/webkit/plugins/ppapi/ppb_file_io_impl.h b/webkit/plugins/ppapi/ppb_file_io_impl.h
index 27353c67110cb55ec9f6a1f238d12bae2e3270d8..2298d87c5fe11c03f5af360d6a6cab721b32b831 100644
--- a/webkit/plugins/ppapi/ppb_file_io_impl.h
+++ b/webkit/plugins/ppapi/ppb_file_io_impl.h
@@ -13,8 +13,6 @@
#include "ppapi/shared_impl/ppb_file_io_shared.h"
#include "webkit/plugins/ppapi/plugin_delegate.h"
-struct PP_CompletionCallback;
-
namespace webkit {
namespace ppapi {
@@ -29,34 +27,43 @@ class PPB_FileIO_Impl : public ::ppapi::PPB_FileIO_Shared {
// as the "Validated" versions below).
virtual void Close() OVERRIDE;
virtual int32_t GetOSFileDescriptor() OVERRIDE;
- virtual int32_t WillWrite(int64_t offset,
- int32_t bytes_to_write,
- PP_CompletionCallback callback) OVERRIDE;
- virtual int32_t WillSetLength(int64_t length,
- PP_CompletionCallback callback) OVERRIDE;
+ virtual int32_t WillWrite(
+ int64_t offset,
+ int32_t bytes_to_write,
+ scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
+ virtual int32_t WillSetLength(
+ int64_t length,
+ scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
private:
// FileIOImpl overrides.
- virtual int32_t OpenValidated(PP_Resource file_ref_resource,
- ::ppapi::thunk::PPB_FileRef_API* file_ref_api,
- int32_t open_flags,
- PP_CompletionCallback callback) OVERRIDE;
- virtual int32_t QueryValidated(PP_FileInfo* info,
- PP_CompletionCallback callback) OVERRIDE;
- virtual int32_t TouchValidated(PP_Time last_access_time,
- PP_Time last_modified_time,
- PP_CompletionCallback callback) OVERRIDE;
- virtual int32_t ReadValidated(int64_t offset,
- char* buffer,
- int32_t bytes_to_read,
- PP_CompletionCallback callback) OVERRIDE;
- virtual int32_t WriteValidated(int64_t offset,
- const char* buffer,
- int32_t bytes_to_write,
- PP_CompletionCallback callback) OVERRIDE;
- virtual int32_t SetLengthValidated(int64_t length,
- PP_CompletionCallback callback) OVERRIDE;
- virtual int32_t FlushValidated(PP_CompletionCallback callback) OVERRIDE;
+ virtual int32_t OpenValidated(
+ PP_Resource file_ref_resource,
+ ::ppapi::thunk::PPB_FileRef_API* file_ref_api,
+ int32_t open_flags,
+ scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
+ virtual int32_t QueryValidated(
+ PP_FileInfo* info,
+ scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
+ virtual int32_t TouchValidated(
+ PP_Time last_access_time,
+ PP_Time last_modified_time,
+ scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
+ virtual int32_t ReadValidated(
+ int64_t offset,
+ char* buffer,
+ int32_t bytes_to_read,
+ scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
+ virtual int32_t WriteValidated(
+ int64_t offset,
+ const char* buffer,
+ int32_t bytes_to_write,
+ scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
+ virtual int32_t SetLengthValidated(
+ int64_t length,
+ scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
+ virtual int32_t FlushValidated(
+ scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
// Returns the plugin delegate for this resource if it exists, or NULL if it
// doesn't. Calling code should always check for NULL.
« no previous file with comments | « webkit/plugins/ppapi/ppb_file_chooser_impl.cc ('k') | webkit/plugins/ppapi/ppb_file_io_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698