| 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);
|
| }
|
|
|
|
|