Commit 1df63fa8 authored by Tommy C. Li's avatar Tommy C. Li Committed by Commit Bot

Omnibox: Make content setting icons use same color as page action icons

Previously, we were not setting the color of content setting icons.
In the pre-Material world, this just worked well enough that no one
noticed apparently.

After this CL, the content setting icons will have the same color set
as the other page action icons.

Bug: 876458
Change-Id: Ifec3601478ceb3e65ac999806558416dfe076401
Reviewed-on: https://chromium-review.googlesource.com/1195721Reviewed-by: default avatarJustin Donnelly <jdonnelly@chromium.org>
Commit-Queue: Tommy Li <tommycli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587280}
parent aa77482e
...@@ -208,18 +208,19 @@ void LocationBarView::Init() { ...@@ -208,18 +208,19 @@ void LocationBarView::Init() {
keyword_hint_view_ = new KeywordHintView(this, profile(), tint()); keyword_hint_view_ = new KeywordHintView(this, profile(), tint());
AddChildView(keyword_hint_view_); AddChildView(keyword_hint_view_);
SkColor icon_color = GetColor(OmniboxPart::RESULTS_ICON);
std::vector<std::unique_ptr<ContentSettingImageModel>> models = std::vector<std::unique_ptr<ContentSettingImageModel>> models =
ContentSettingImageModel::GenerateContentSettingImageModels(); ContentSettingImageModel::GenerateContentSettingImageModels();
for (auto& model : models) { for (auto& model : models) {
ContentSettingImageView* image_view = ContentSettingImageView* image_view =
new ContentSettingImageView(std::move(model), this, font_list); new ContentSettingImageView(std::move(model), this, font_list);
image_view->SetIconColor(icon_color);
content_setting_views_.push_back(image_view); content_setting_views_.push_back(image_view);
image_view->SetVisible(false); image_view->SetVisible(false);
AddChildView(image_view); AddChildView(image_view);
} }
SkColor icon_color = GetColor(OmniboxPart::RESULTS_ICON);
std::vector<PageActionIconType> page_action_icon_types; std::vector<PageActionIconType> page_action_icon_types;
// |browser_| may be null when LocationBarView is used for non-Browser windows // |browser_| may be null when LocationBarView is used for non-Browser windows
// such as PresentationReceiverWindowView, which do not support page actions. // such as PresentationReceiverWindowView, which do not support page actions.
......
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