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

Unified Diff: ppapi/proxy/ppb_flash_menu_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_system_proxy.cc ('k') | ppapi/proxy/ppb_graphics_2d_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_flash_menu_proxy.cc
diff --git a/ppapi/proxy/ppb_flash_menu_proxy.cc b/ppapi/proxy/ppb_flash_menu_proxy.cc
index 276aaf88579f68e784c2b6c096cc43d998c53802..1c919a6f3ec8a336d11fb194a4d11fd789cd9fd4 100644
--- a/ppapi/proxy/ppb_flash_menu_proxy.cc
+++ b/ppapi/proxy/ppb_flash_menu_proxy.cc
@@ -30,7 +30,7 @@ class FlashMenu : public PPB_Flash_Menu_API, public Resource {
// PPB_Flash_Menu_API implementation.
virtual int32_t Show(const PP_Point* location,
int32_t* selected_id,
- PP_CompletionCallback callback) OVERRIDE;
+ scoped_refptr<TrackedCallback> callback) OVERRIDE;
void ShowACK(int32_t selected_id, int32_t result);
@@ -55,12 +55,12 @@ PPB_Flash_Menu_API* FlashMenu::AsPPB_Flash_Menu_API() {
int32_t FlashMenu::Show(const struct PP_Point* location,
int32_t* selected_id,
- struct PP_CompletionCallback callback) {
+ scoped_refptr<TrackedCallback> callback) {
if (TrackedCallback::IsPending(callback_))
return PP_ERROR_INPROGRESS;
selected_id_ptr_ = selected_id;
- callback_ = new TrackedCallback(this, callback);
+ callback_ = callback;
PluginDispatcher::GetForResource(this)->Send(
new PpapiHostMsg_PPBFlashMenu_Show(
« no previous file with comments | « ppapi/proxy/ppb_file_system_proxy.cc ('k') | ppapi/proxy/ppb_graphics_2d_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698