Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8565)

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_action_view.cc

Issue 1647903003: Fix the dynamic browser action setIcon path to work with any size icon. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/toolbar/toolbar_action_view.cc
diff --git a/chrome/browser/ui/views/toolbar/toolbar_action_view.cc b/chrome/browser/ui/views/toolbar/toolbar_action_view.cc
index 13198fb2a94c50b90ee6b74e2670a52b60461db8..237c76e208bb153125aea12b554556679a3d26f6 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_action_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_action_view.cc
@@ -158,12 +158,8 @@ void ToolbarActionView::UpdateState() {
view_controller_->GetIcon(web_contents,
GetPreferredSize()).AsImageSkia());
- if (!icon.isNull()) {
- gfx::ImageSkia bg = *ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
- IDR_BROWSER_ACTION);
- SetImage(views::Button::STATE_NORMAL,
- gfx::ImageSkiaOperations::CreateSuperimposedImage(bg, icon));
- }
+ if (!icon.isNull())
+ SetImage(views::Button::STATE_NORMAL, icon);
SetTooltipText(view_controller_->GetTooltip(web_contents));
SetAccessibleName(view_controller_->GetAccessibleName(web_contents));
« no previous file with comments | « chrome/browser/ui/extensions/icon_with_badge_image_source.cc ('k') | chrome/common/extensions/api/browser_action.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698