Commit 50f567a5 authored by Justin Donnelly's avatar Justin Donnelly Committed by Commit Bot

[omnibox] Update default suggestion icons for MD Refresh.

The search and bookmark icons are the same as was already being used for
Touchable. The "page" icon is now a globe, which will be used for MD
Refresh (standard and touch) but not non-Refresh touch.

The colors will be updated in a future CL that addresses both icon color
and row highlight color.

Bug: 846407
Change-Id: Ieb9d020bfe27d6610694fd8c773ef1934e9d8c36
Reviewed-on: https://chromium-review.googlesource.com/1104874
Commit-Queue: Justin Donnelly <jdonnelly@chromium.org>
Reviewed-by: default avatarDave Schuyler <dschuyler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568686}
parent 6c0eb696
......@@ -30,6 +30,7 @@ aggregate_vector_icons("omnibox_vector_icons") {
"extension_app.icon",
"http.icon",
"keyword_search.icon",
"md_page.icon",
"star.icon",
"switch.icon",
"tab.icon",
......
......@@ -199,11 +199,16 @@ const gfx::VectorIcon& AutocompleteMatch::TypeToVectorIcon(Type type,
bool is_bookmark,
bool is_tab_match) {
#if (!defined(OS_ANDROID) || BUILDFLAG(ENABLE_VR)) && !defined(OS_IOS)
const bool is_refresh_ui = ui::MaterialDesignController::IsRefreshUi();
const bool is_touch_ui =
ui::MaterialDesignController::IsTouchOptimizedUiEnabled();
if (is_bookmark)
return is_touch_ui ? omnibox::kTouchableBookmarkIcon : omnibox::kStarIcon;
if (is_bookmark) {
if (is_refresh_ui || is_touch_ui)
return omnibox::kTouchableBookmarkIcon;
else
return omnibox::kStarIcon;
}
switch (type) {
case Type::URL_WHAT_YOU_TYPED:
......@@ -218,7 +223,12 @@ const gfx::VectorIcon& AutocompleteMatch::TypeToVectorIcon(Type type,
case Type::PHYSICAL_WEB_DEPRECATED:
case Type::PHYSICAL_WEB_OVERFLOW_DEPRECATED:
case Type::TAB_SEARCH_DEPRECATED:
return is_touch_ui ? omnibox::kTouchablePageIcon : omnibox::kHttpIcon;
if (is_refresh_ui)
return omnibox::kMdPageIcon;
else if (is_touch_ui)
return omnibox::kTouchablePageIcon;
else
return omnibox::kHttpIcon;
case Type::SEARCH_WHAT_YOU_TYPED:
case Type::SEARCH_HISTORY:
......@@ -229,8 +239,10 @@ const gfx::VectorIcon& AutocompleteMatch::TypeToVectorIcon(Type type,
case Type::SEARCH_OTHER_ENGINE:
case Type::CONTACT_DEPRECATED:
case Type::VOICE_SUGGEST:
return is_touch_ui ? omnibox::kTouchableSearchIcon
: vector_icons::kSearchIcon;
if (is_refresh_ui || is_touch_ui)
return omnibox::kTouchableSearchIcon;
else
return vector_icons::kSearchIcon;
case Type::EXTENSION_APP_DEPRECATED:
return omnibox::kExtensionAppIcon;
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
CANVAS_DIMENSIONS, 24,
MOVE_TO, 12, 2,
R_CUBIC_TO, 5.52f, 0, 10, 4.48f, 10, 10,
R_CUBIC_TO, 0, 5.52f, -4.48f, 10, -10, 10,
CUBIC_TO_SHORTHAND, 2, 17.52f, 2, 12,
CUBIC_TO_SHORTHAND, 6.48f, 2, 12, 2,
CLOSE,
MOVE_TO, 4, 12,
R_H_LINE_TO, 4.4f,
R_CUBIC_TO, 3.41f, 0.02f, 4.92f, 1.73f, 4.54f, 5.13f,
H_LINE_TO, 9.49f,
R_V_LINE_TO, 2.47f,
R_ARC_TO, 8, 8, 0, 0, 0, 10.5f, -8.08f,
CUBIC_TO, 19.33f, 12.5f, 18.33f, 13, 17, 13,
R_CUBIC_TO, -2.14f, 0, -3.21f, -0.92f, -3.21f, -2.75f,
R_H_LINE_TO, -3.75f,
R_CUBIC_TO, -0.27f, -2.73f, 0.68f, -4.09f, 2.87f, -4.09f,
R_CUBIC_TO, 0, -0.97f, 0.33f, -1.6f, 0.81f, -1.97f,
ARC_TO, 8, 8, 0, 0, 0, 4, 12,
CLOSE
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