Commit c67e3ff0 authored by Jenny Zhang's avatar Jenny Zhang Committed by Commit Bot

Do not invoke remove query dialog for non-zero state query result.

Bug: 938540
Change-Id: Ic4441c4bf5fbc2ca82b4a0393e96514ea4e99d20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504051Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Jenny Zhang <jennyz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#637845}
parent 027118d3
...@@ -387,13 +387,16 @@ void SearchResultView::VisibilityChanged(View* starting_from, bool is_visible) { ...@@ -387,13 +387,16 @@ void SearchResultView::VisibilityChanged(View* starting_from, bool is_visible) {
void SearchResultView::OnGestureEvent(ui::GestureEvent* event) { void SearchResultView::OnGestureEvent(ui::GestureEvent* event) {
switch (event->type()) { switch (event->type()) {
case ui::ET_GESTURE_LONG_PRESS: case ui::ET_GESTURE_LONG_PRESS:
ScrollRectToVisible(GetLocalBounds()); if (actions_view_->IsValidActionIndex(
NotifyAccessibilityEvent(ax::mojom::Event::kSelection, true); ash::OmniBoxZeroStateAction::kRemoveSuggestion)) {
SetBackgroundHighlighted(true); ScrollRectToVisible(GetLocalBounds());
confirm_remove_by_long_press_ = true; NotifyAccessibilityEvent(ax::mojom::Event::kSelection, true);
OnSearchResultActionActivated( SetBackgroundHighlighted(true);
ash::OmniBoxZeroStateAction::kRemoveSuggestion, event->flags()); confirm_remove_by_long_press_ = true;
event->SetHandled(); OnSearchResultActionActivated(
ash::OmniBoxZeroStateAction::kRemoveSuggestion, event->flags());
event->SetHandled();
}
break; break;
default: default:
break; break;
......
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