summaryrefslogtreecommitdiffstats
path: root/views/controls/scrollbar/bitmap_scroll_bar.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-14 21:06:57 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-14 21:06:57 +0000
commit6277eaded1883e224015efcc5456e3c265e8b633 (patch)
tree2c36feca37d7a6132fa14556fb146307285c007d /views/controls/scrollbar/bitmap_scroll_bar.cc
parentaa1dddf057a4295ee1c09c0566eb98ecd8de8fb8 (diff)
downloadchromium_src-6277eaded1883e224015efcc5456e3c265e8b633.zip
chromium_src-6277eaded1883e224015efcc5456e3c265e8b633.tar.gz
chromium_src-6277eaded1883e224015efcc5456e3c265e8b633.tar.bz2
Refactors menus so that I can create a MenuGtk implementation, and moves it into
the namespace views. BUG=none TEST=make sure I haven't broken any menus. This impacts all menus in Chrome, except bookmark ones. Review URL: http://codereview.chromium.org/113410 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16100 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/scrollbar/bitmap_scroll_bar.cc')
-rw-r--r--views/controls/scrollbar/bitmap_scroll_bar.cc25
1 files changed, 13 insertions, 12 deletions
diff --git a/views/controls/scrollbar/bitmap_scroll_bar.cc b/views/controls/scrollbar/bitmap_scroll_bar.cc
index 18096fb..4fe8934 100644
--- a/views/controls/scrollbar/bitmap_scroll_bar.cc
+++ b/views/controls/scrollbar/bitmap_scroll_bar.cc
@@ -540,18 +540,19 @@ void BitmapScrollBar::ShowContextMenu(View* source,
View::ConvertPointFromWidget(this, &temp_pt);
context_menu_mouse_position_ = IsHorizontal() ? temp_pt.x() : temp_pt.y();
- Menu menu(this, Menu::TOPLEFT, GetWidget()->GetNativeView());
- menu.AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollHere);
- menu.AppendSeparator();
- menu.AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollStart);
- menu.AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollEnd);
- menu.AppendSeparator();
- menu.AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollPageUp);
- menu.AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollPageDown);
- menu.AppendSeparator();
- menu.AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollPrev);
- menu.AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollNext);
- menu.RunMenuAt(x, y);
+ scoped_ptr<Menu> menu(
+ Menu::Create(this, Menu::TOPLEFT, GetWidget()->GetNativeView()));
+ menu->AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollHere);
+ menu->AppendSeparator();
+ menu->AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollStart);
+ menu->AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollEnd);
+ menu->AppendSeparator();
+ menu->AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollPageUp);
+ menu->AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollPageDown);
+ menu->AppendSeparator();
+ menu->AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollPrev);
+ menu->AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollNext);
+ menu->RunMenuAt(x, y);
}
///////////////////////////////////////////////////////////////////////////////