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

Unified Diff: ppapi/proxy/ppb_flash_menu_proxy.cc

Issue 7206016: Convert most remaining resources to use the API/thunk system. The significant (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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
Index: ppapi/proxy/ppb_flash_menu_proxy.cc
===================================================================
--- ppapi/proxy/ppb_flash_menu_proxy.cc (revision 89610)
+++ ppapi/proxy/ppb_flash_menu_proxy.cc (working copy)
@@ -183,18 +183,10 @@
void PPB_Flash_Menu_Proxy::OnMsgShowACK(const HostResource& menu,
int32_t selected_id,
int32_t result) {
- PP_Resource plugin_resource =
- PluginResourceTracker::GetInstance()->PluginResourceForHostResource(menu);
- if (!plugin_resource)
+ EnterPluginFromHostResource<PPB_Flash_Menu_API> enter(menu);
+ if (enter.failed())
return;
- FlashMenu* object = PluginResource::GetAs<FlashMenu>(plugin_resource);
- if (!object) {
- // The plugin has released the FlashMenu object so don't issue the
- // callback.
- return;
- }
-
- object->ShowACK(selected_id, result);
+ static_cast<FlashMenu*>(enter.object())->ShowACK(selected_id, result);
}
void PPB_Flash_Menu_Proxy::SendShowACKToPlugin(

Powered by Google App Engine
This is Rietveld 408576698