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

Unified Diff: content/renderer/pepper_plugin_delegate_impl.cc

Issue 7492054: Don't send ViewMsg_ContextMenuClosed to the renderer process for submenus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 5 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 | « chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc ('k') | ui/base/models/simple_menu_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper_plugin_delegate_impl.cc
diff --git a/content/renderer/pepper_plugin_delegate_impl.cc b/content/renderer/pepper_plugin_delegate_impl.cc
index 325f3f8fa160c8015556c9f3f98bb0454730de12..6ba3f63be92004bf375de9325f85fb28ada7caf3 100644
--- a/content/renderer/pepper_plugin_delegate_impl.cc
+++ b/content/renderer/pepper_plugin_delegate_impl.cc
@@ -1226,12 +1226,14 @@ int32_t PepperPluginDelegateImpl::ShowContextMenu(
void PepperPluginDelegateImpl::OnContextMenuClosed(
const webkit_glue::CustomContextMenuContext& custom_context) {
int request_id = custom_context.request_id;
- scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl> menu =
- *pending_context_menus_.Lookup(request_id);
- if (!menu) {
+ scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>* menu_ptr =
+ pending_context_menus_.Lookup(request_id);
+ if (!menu_ptr) {
NOTREACHED() << "CompleteShowContextMenu() called twice for the same menu.";
return;
}
+ scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl> menu = *menu_ptr;
+ DCHECK(menu.get());
pending_context_menus_.Remove(request_id);
if (has_saved_context_menu_action_) {
« no previous file with comments | « chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc ('k') | ui/base/models/simple_menu_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698