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

Side by Side Diff: ppapi/proxy/ppb_flash_menu_proxy.cc

Issue 10909244: PPAPI: Get TrackedCallback ready for running on non-main threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged. Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/proxy/ppb_flash_menu_proxy.h" 5 #include "ppapi/proxy/ppb_flash_menu_proxy.h"
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/private/ppb_flash_menu.h" 8 #include "ppapi/c/private/ppb_flash_menu.h"
9 #include "ppapi/proxy/enter_proxy.h" 9 #include "ppapi/proxy/enter_proxy.h"
10 #include "ppapi/proxy/ppapi_messages.h" 10 #include "ppapi/proxy/ppapi_messages.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 callback_ = callback; 63 callback_ = callback;
64 64
65 PluginDispatcher::GetForResource(this)->Send( 65 PluginDispatcher::GetForResource(this)->Send(
66 new PpapiHostMsg_PPBFlashMenu_Show( 66 new PpapiHostMsg_PPBFlashMenu_Show(
67 API_ID_PPB_FLASH_MENU, host_resource(), *location)); 67 API_ID_PPB_FLASH_MENU, host_resource(), *location));
68 return PP_OK_COMPLETIONPENDING; 68 return PP_OK_COMPLETIONPENDING;
69 } 69 }
70 70
71 void FlashMenu::ShowACK(int32_t selected_id, int32_t result) { 71 void FlashMenu::ShowACK(int32_t selected_id, int32_t result) {
72 *selected_id_ptr_ = selected_id; 72 *selected_id_ptr_ = selected_id;
73 TrackedCallback::ClearAndRun(&callback_, result); 73 callback_->Run(result);
74 } 74 }
75 75
76 PPB_Flash_Menu_Proxy::PPB_Flash_Menu_Proxy(Dispatcher* dispatcher) 76 PPB_Flash_Menu_Proxy::PPB_Flash_Menu_Proxy(Dispatcher* dispatcher)
77 : InterfaceProxy(dispatcher), 77 : InterfaceProxy(dispatcher),
78 callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { 78 callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
79 } 79 }
80 80
81 PPB_Flash_Menu_Proxy::~PPB_Flash_Menu_Proxy() { 81 PPB_Flash_Menu_Proxy::~PPB_Flash_Menu_Proxy() {
82 } 82 }
83 83
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 dispatcher()->Send(new PpapiMsg_PPBFlashMenu_ShowACK( 165 dispatcher()->Send(new PpapiMsg_PPBFlashMenu_ShowACK(
166 API_ID_PPB_FLASH_MENU, 166 API_ID_PPB_FLASH_MENU,
167 request->menu, 167 request->menu,
168 request->selected_id, 168 request->selected_id,
169 result)); 169 result));
170 delete request; 170 delete request;
171 } 171 }
172 172
173 } // namespace proxy 173 } // namespace proxy
174 } // namespace ppapi 174 } // namespace ppapi
OLDNEW
« 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