Commit cd93e4d6 authored by David Black's avatar David Black Committed by Chromium LUCI CQ

Handle context menu opening via two finger gesture tap.

It is possible to open a context menu via two finger gesture tap. We
previously didn't handle this gesture so selection state was empty.

Bug: 1166274
Change-Id: I259082d7c41391a23ccabd99573343e77c68bc78
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2627440Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
Commit-Queue: David Black <dmblack@google.com>
Cr-Commit-Position: refs/heads/master@{#843216}
parent 79f7d693
...@@ -115,9 +115,10 @@ bool HoldingSpaceItemViewDelegate::OnHoldingSpaceItemViewAccessibleAction( ...@@ -115,9 +115,10 @@ bool HoldingSpaceItemViewDelegate::OnHoldingSpaceItemViewAccessibleAction(
void HoldingSpaceItemViewDelegate::OnHoldingSpaceItemViewGestureEvent( void HoldingSpaceItemViewDelegate::OnHoldingSpaceItemViewGestureEvent(
HoldingSpaceItemView* view, HoldingSpaceItemView* view,
const ui::GestureEvent& event) { const ui::GestureEvent& event) {
// When a long press gesture occurs we are going to show the context menu. // When a long press or two finger tap gesture occurs we are going to show the
// Ensure that the pressed `view` is the only view selected. // context menu. Ensure that the pressed `view` is the only view selected.
if (event.type() == ui::ET_GESTURE_LONG_PRESS) { if (event.type() == ui::ET_GESTURE_LONG_PRESS ||
event.type() == ui::ET_GESTURE_TWO_FINGER_TAP) {
SetSelection(view); SetSelection(view);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment