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

Unified Diff: chrome/browser/tab_contents/tab_contents_view_win.cc

Issue 122027: Remove the Menu object, converting all the remaining callers to use Menu2. I'... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_view_win.h ('k') | chrome/browser/views/bookmark_bar_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/tab_contents_view_win.cc
===================================================================
--- chrome/browser/tab_contents/tab_contents_view_win.cc (revision 18306)
+++ chrome/browser/tab_contents/tab_contents_view_win.cc (working copy)
@@ -394,16 +394,11 @@
void TabContentsViewWin::ShowContextMenu(const ContextMenuParams& params) {
// Allow delegates to handle the context menu operation first.
- if (tab_contents()->delegate()->HandleContextMenu(params)) {
+ if (tab_contents()->delegate()->HandleContextMenu(params))
return;
- }
- RenderViewContextMenuWin menu(tab_contents(),
- params,
- GetNativeView());
+ context_menu_.reset(new RenderViewContextMenuWin(tab_contents(), params));
- menu.Init();
-
POINT screen_pt = { params.x, params.y };
MapWindowPoints(GetNativeView(), HWND_DESKTOP, &screen_pt, 1);
@@ -411,7 +406,7 @@
// the context menu is being displayed.
bool old_state = MessageLoop::current()->NestableTasksAllowed();
MessageLoop::current()->SetNestableTasksAllowed(true);
- menu.RunMenuAt(screen_pt.x, screen_pt.y);
+ context_menu_->RunMenuAt(screen_pt.x, screen_pt.y);
MessageLoop::current()->SetNestableTasksAllowed(old_state);
}
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_view_win.h ('k') | chrome/browser/views/bookmark_bar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698