| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 dispatcher()->Send(new PpapiMsg_PPBFlashMenu_ShowACK( | 162 dispatcher()->Send(new PpapiMsg_PPBFlashMenu_ShowACK( |
| 163 API_ID_PPB_FLASH_MENU, | 163 API_ID_PPB_FLASH_MENU, |
| 164 request->menu, | 164 request->menu, |
| 165 request->selected_id, | 165 request->selected_id, |
| 166 result)); | 166 result)); |
| 167 delete request; | 167 delete request; |
| 168 } | 168 } |
| 169 | 169 |
| 170 } // namespace proxy | 170 } // namespace proxy |
| 171 } // namespace ppapi | 171 } // namespace ppapi |
| OLD | NEW |