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

Unified Diff: ui/views/controls/native_control_win.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/native_control.cc ('k') | ui/views/controls/scrollbar/base_scroll_bar.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/native_control_win.cc
diff --git a/ui/views/controls/native_control_win.cc b/ui/views/controls/native_control_win.cc
index 1b4f583ed9b28a16dfdc821ed87e897210c549ef..2b6c6d4257174bdb3d88f80ddf2aaaf13d912dec 100644
--- a/ui/views/controls/native_control_win.cc
+++ b/ui/views/controls/native_control_win.cc
@@ -124,10 +124,12 @@ void NativeControlWin::ShowContextMenu(const gfx::Point& location) {
if (!context_menu_controller())
return;
- if (location.x() == -1 && location.y() == -1)
- View::ShowContextMenu(GetKeyboardContextMenuLocation(), false);
- else
- View::ShowContextMenu(location, true);
+ if (location.x() == -1 && location.y() == -1) {
+ View::ShowContextMenu(GetKeyboardContextMenuLocation(),
+ ui::MENU_SOURCE_KEYBOARD);
+ } else {
+ View::ShowContextMenu(location, ui::MENU_SOURCE_MOUSE);
+ }
}
void NativeControlWin::NativeControlCreated(HWND native_control) {
« no previous file with comments | « ui/views/controls/native_control.cc ('k') | ui/views/controls/scrollbar/base_scroll_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698