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

Unified Diff: ppapi/thunk/ppb_file_chooser_thunk.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/thunk/ppb_file_chooser_api.h ('k') | ppapi/thunk/ppb_file_io_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_file_chooser_thunk.cc
diff --git a/ppapi/thunk/ppb_file_chooser_thunk.cc b/ppapi/thunk/ppb_file_chooser_thunk.cc
index 8db1b501966998701543209a98ad5e1cbe9b9038..c52125a42996325e31f636644e8d4b1e165c3b19 100644
--- a/ppapi/thunk/ppb_file_chooser_thunk.cc
+++ b/ppapi/thunk/ppb_file_chooser_thunk.cc
@@ -6,6 +6,7 @@
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/trusted/ppb_file_chooser_trusted.h"
+#include "ppapi/shared_impl/tracked_callback.h"
#include "ppapi/shared_impl/var.h"
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/thunk.h"
@@ -38,7 +39,7 @@ int32_t Show0_5(PP_Resource chooser, PP_CompletionCallback callback) {
EnterResource<PPB_FileChooser_API> enter(chooser, callback, true);
if (enter.failed())
return enter.retval();
- return enter.SetResult(enter.object()->Show0_5(callback));
+ return enter.SetResult(enter.object()->Show0_5(enter.callback()));
}
PP_Resource GetNextChosenFile0_5(PP_Resource chooser) {
@@ -54,7 +55,7 @@ int32_t Show(PP_Resource chooser,
EnterResource<PPB_FileChooser_API> enter(chooser, callback, true);
if (enter.failed())
return enter.retval();
- return enter.SetResult(enter.object()->Show(output, callback));
+ return enter.SetResult(enter.object()->Show(output, enter.callback()));
}
int32_t ShowWithoutUserGesture0_5(PP_Resource chooser,
@@ -65,7 +66,7 @@ int32_t ShowWithoutUserGesture0_5(PP_Resource chooser,
if (enter.failed())
return enter.retval();
return enter.SetResult(enter.object()->ShowWithoutUserGesture0_5(
- save_as, suggested_file_name, callback));
+ save_as, suggested_file_name, enter.callback()));
}
int32_t ShowWithoutUserGesture0_6(PP_Resource chooser,
@@ -77,7 +78,7 @@ int32_t ShowWithoutUserGesture0_6(PP_Resource chooser,
if (enter.failed())
return enter.retval();
return enter.SetResult(enter.object()->ShowWithoutUserGesture(
- save_as, suggested_file_name, output, callback));
+ save_as, suggested_file_name, output, enter.callback()));
}
const PPB_FileChooser_Dev_0_5 g_ppb_file_chooser_0_5_thunk = {
« no previous file with comments | « ppapi/thunk/ppb_file_chooser_api.h ('k') | ppapi/thunk/ppb_file_io_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698