Skip to content

Commit

Permalink
Update extensions button's color when overriding icon color
Browse files Browse the repository at this point in the history
In the previous CL, a code calling ExtensionToolbarButton::UpdateIcon()
from ExtensionToolbarContainer was removed.
(https://chromium-review.googlesource.com/c/chromium/src/+/2253600/29/chrome/browser/ui/views/extensions/extensions_toolbar_container.cc)

However, ExtensionToolbarButton should update icon color
when WebAppFrameToolbar overrides icon color for ExtensionToolbarButton.
(https://chromium.googlesource.com/chromium/src/+/master/chrome/browser/ui/views/web_apps/web_app_frame_toolbar_view.cc#471)
Otherwise, ExtensionToolbarButton ignores the overridden color.

When WebAppFrameToolbar overrides icon color, ExtensionToolbarContainer::UpdateAllIcon()
we be called. Thus, we should call ExtensionToolbarButton::UpdateIcon() in it.

Bug: 1106698, 1048901
Change-Id: I2082a16d18b312cd5a578f2c84b709e60cee6c5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2303418
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789552}
  • Loading branch information
sangwoo108 authored and Commit Bot committed Jul 17, 2020
1 parent 9698815 commit 5b8f7ad
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ ExtensionsToolbarContainer::~ExtensionsToolbarContainer() {
}

void ExtensionsToolbarContainer::UpdateAllIcons() {
extensions_button_->UpdateIcon();
for (const auto& action : actions_)
action->UpdateState();
}
Expand Down

0 comments on commit 5b8f7ad

Please sign in to comment.