OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |