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

Unified Diff: ui/views/controls/native_control.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/menu/menu_runner.cc ('k') | ui/views/controls/native_control_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/native_control.cc
diff --git a/ui/views/controls/native_control.cc b/ui/views/controls/native_control.cc
index 687f193078b846fd25dab0fbcde8165f30275470..e6219e74a1cb4976b5b334d64618e22cf7af73b0 100644
--- a/ui/views/controls/native_control.cc
+++ b/ui/views/controls/native_control.cc
@@ -269,10 +269,12 @@ void NativeControl::OnContextMenu(const POINT& location) {
if (!context_menu_controller())
return;
- if (location.x == -1 && location.y == -1)
- ShowContextMenu(GetKeyboardContextMenuLocation(), false);
- else
- ShowContextMenu(gfx::Point(location), true);
+ if (location.x == -1 && location.y == -1) {
+ ShowContextMenu(GetKeyboardContextMenuLocation(),
+ ui::MENU_SOURCE_KEYBOARD);
+ } else {
+ ShowContextMenu(gfx::Point(location), ui::MENU_SOURCE_MOUSE);
+ }
}
void NativeControl::OnFocus() {
« no previous file with comments | « ui/views/controls/menu/menu_runner.cc ('k') | ui/views/controls/native_control_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698