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

Unified Diff: ppapi/proxy/ppb_file_system_proxy.cc

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 | « ppapi/proxy/ppb_file_ref_proxy.cc ('k') | ppapi/proxy/ppb_flash_menu_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_file_system_proxy.cc
diff --git a/ppapi/proxy/ppb_file_system_proxy.cc b/ppapi/proxy/ppb_file_system_proxy.cc
index 370dcabfbb618c7d7db9e8d5b8616a84af1d12bb..4619a1f01915dc0ac0a851fee6a31a76f27cfc83 100644
--- a/ppapi/proxy/ppb_file_system_proxy.cc
+++ b/ppapi/proxy/ppb_file_system_proxy.cc
@@ -46,7 +46,7 @@ class FileSystem : public Resource, public PPB_FileSystem_API {
// PPB_FileSystem_APi implementation.
virtual int32_t Open(int64_t expected_size,
- PP_CompletionCallback callback) OVERRIDE;
+ scoped_refptr<TrackedCallback> callback) OVERRIDE;
virtual PP_FileSystemType GetType() OVERRIDE;
// Called when the host has responded to our open request.
@@ -75,13 +75,13 @@ PPB_FileSystem_API* FileSystem::AsPPB_FileSystem_API() {
}
int32_t FileSystem::Open(int64_t expected_size,
- PP_CompletionCallback callback) {
+ scoped_refptr<TrackedCallback> callback) {
if (TrackedCallback::IsPending(current_open_callback_))
return PP_ERROR_INPROGRESS;
if (called_open_)
return PP_ERROR_FAILED;
- current_open_callback_ = new TrackedCallback(this, callback);
+ current_open_callback_ = callback;
called_open_ = true;
PluginDispatcher::GetForResource(this)->Send(
new PpapiHostMsg_PPBFileSystem_Open(
« no previous file with comments | « ppapi/proxy/ppb_file_ref_proxy.cc ('k') | ppapi/proxy/ppb_flash_menu_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698