Add X button in search bar with active query

Desktop / Chromium - Weidong Guo [chromium.org] - 13 July 2017 21:08 EDT

Changes: 1. Add X button in search box view. 2. Replace speech button with X button when the search box is active. 3. When X button is clicked, clear query in search box.

Screenshot:https://screenshot.googleplex.com/aNdmi8pgqFD Specs: https://screenshot.googleplex.com/TX3rT2XXW3f

BUG=735499 TEST=app_list_unittests --gtest_filter='SearchBoxViewTest.CloseButtonTest'

Change-Id: I60490d2b9bfbabf573f66d372cd98c70a95ac787 Reviewed-on: https://chromium-review.googlesource.com/568225

d4d19c5 Add X button in search bar with active query
ui/app_list/vector_icons/BUILD.gn | 2 +
ui/app_list/vector_icons/ic_close.1x.icon | 19 ++++++++
ui/app_list/vector_icons/ic_close.icon | 19 ++++++++
ui/app_list/views/search_box_view.cc | 68 ++++++++++++++++++++++-----
ui/app_list/views/search_box_view.h | 22 +++++----
ui/app_list/views/search_box_view_unittest.cc | 53 ++++++++++++++++++---
6 files changed, 155 insertions(+), 28 deletions(-)

Upstream: git.chromium.org


  • Share