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

Unified Diff: ui/views/controls/scrollbar/base_scroll_bar.cc

Issue 16979002: Add ContextMenuSourceType to views::ContextMenuController::ShowContextMenuForView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 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 | « ui/views/controls/scrollbar/base_scroll_bar.h ('k') | ui/views/controls/textfield/native_textfield_views.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/scrollbar/base_scroll_bar.cc
diff --git a/ui/views/controls/scrollbar/base_scroll_bar.cc b/ui/views/controls/scrollbar/base_scroll_bar.cc
index 64b1d13a06edf9f464890403513d0c680079eac5..bf96a98a74a5837714e38bc3faa1ae18bd9f3b53 100644
--- a/ui/views/controls/scrollbar/base_scroll_bar.cc
+++ b/ui/views/controls/scrollbar/base_scroll_bar.cc
@@ -273,7 +273,9 @@ enum ScrollBarContextMenuCommands {
ScrollBarContextMenuCommand_ScrollNext
};
-void BaseScrollBar::ShowContextMenuForView(View* source, const gfx::Point& p) {
+void BaseScrollBar::ShowContextMenuForView(View* source,
+ const gfx::Point& p,
+ ui::MenuSourceType source_type) {
Widget* widget = GetWidget();
gfx::Rect widget_bounds = widget->GetWindowBoundsInScreen();
gfx::Point temp_pt(p.x() - widget_bounds.x(), p.y() - widget_bounds.y());
@@ -294,7 +296,7 @@ void BaseScrollBar::ShowContextMenuForView(View* source, const gfx::Point& p) {
menu->AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollPrev);
menu->AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollNext);
if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(p, gfx::Size()),
- MenuItemView::TOPLEFT, MenuRunner::HAS_MNEMONICS |
+ views::MenuItemView::TOPLEFT, source_type, MenuRunner::HAS_MNEMONICS |
views::MenuRunner::CONTEXT_MENU) ==
MenuRunner::MENU_DELETED)
return;
« no previous file with comments | « ui/views/controls/scrollbar/base_scroll_bar.h ('k') | ui/views/controls/textfield/native_textfield_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698