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

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

Issue 1580983002: Fix the dynamic browser action setIcon path to work with any size icon. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: twiddle constant 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 f4deaeae96fd729ed27ee56a486069999b4aaf46..bde5436664b0b9157dd9b2c634475878e0871cd7 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_action_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_action_view.cc
@@ -155,12 +155,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