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

Unified Diff: chrome/browser/tab_contents/render_view_context_menu.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
Index: chrome/browser/tab_contents/render_view_context_menu.cc
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index b4b8518d4be1332e2a00c25c7dec9518985ce2cc..12962985c9b3c9c577c9090b61b70aab3cd3efbc 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -1678,13 +1678,21 @@ RenderViewContextMenu::GetHandlersForLinkUrl() {
return handlers;
}
-void RenderViewContextMenu::MenuWillShow() {
+void RenderViewContextMenu::MenuWillShow(ui::SimpleMenuModel* source) {
+ // Ignore notifications from submenus.
+ if (source != &menu_model_)
+ return;
+
RenderWidgetHostView* view = source_tab_contents_->GetRenderWidgetHostView();
if (view)
view->ShowingContextMenu(true);
}
-void RenderViewContextMenu::MenuClosed() {
+void RenderViewContextMenu::MenuClosed(ui::SimpleMenuModel* source) {
+ // Ignore notifications from submenus.
+ if (source != &menu_model_)
+ return;
+
RenderWidgetHostView* view = source_tab_contents_->GetRenderWidgetHostView();
if (view)
view->ShowingContextMenu(false);
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu.h ('k') | chrome/browser/ui/cocoa/menu_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698