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

Unified Diff: ui/views/controls/tree/tree_view.cc

Issue 16979002: Add ContextMenuSourceType to views::ContextMenuController::ShowContextMenuForView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win build 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
Index: ui/views/controls/tree/tree_view.cc
diff --git a/ui/views/controls/tree/tree_view.cc b/ui/views/controls/tree/tree_view.cc
index e60b9c0488b76d795a48e36a5e71360757391cdf..083a58516ed3b7fcb7d8462ec55c2fce8c05d0c0 100644
--- a/ui/views/controls/tree/tree_view.cc
+++ b/ui/views/controls/tree/tree_view.cc
@@ -380,10 +380,11 @@ void TreeView::OnGestureEvent(ui::GestureEvent* event) {
}
}
-void TreeView::ShowContextMenu(const gfx::Point& p, bool is_mouse_gesture) {
+void TreeView::ShowContextMenu(const gfx::Point& p,
+ ui::MenuSourceType source_type) {
if (!model_)
return;
- if (is_mouse_gesture) {
+ if (source_type == ui::MENU_SOURCE_MOUSE) {
// Only invoke View's implementation (which notifies the
// ContextMenuController) if over a node.
gfx::Point local_point(p);
@@ -397,7 +398,7 @@ void TreeView::ShowContextMenu(const gfx::Point& p, bool is_mouse_gesture) {
if (!bounds.Contains(local_point))
return;
}
- View::ShowContextMenu(p, is_mouse_gesture);
+ View::ShowContextMenu(p, source_type);
}
void TreeView::GetAccessibleState(ui::AccessibleViewState* state) {

Powered by Google App Engine
This is Rietveld 408576698