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

Unified Diff: chrome/browser/ui/views/location_bar/page_action_image_view.cc

Issue 1214243003: [Extensions UI] Clean up extension icon generation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/skia/ImageSkia Created 5 years, 5 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/location_bar/page_action_image_view.cc
diff --git a/chrome/browser/ui/views/location_bar/page_action_image_view.cc b/chrome/browser/ui/views/location_bar/page_action_image_view.cc
index 34ce3d5c06a7720ecd1c6cba81c12652833cc41a..ac29230dd6a43f3be9070a55351c52fe9fa067b7 100644
--- a/chrome/browser/ui/views/location_bar/page_action_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/page_action_image_view.cc
@@ -104,23 +104,13 @@ void PageActionImageView::UpdateVisibility(content::WebContents* contents) {
SetTooltipText(base::UTF8ToUTF16(tooltip_));
// Set the image.
- gfx::Image icon = view_controller_->GetIcon(contents);
+ gfx::Image icon = view_controller_->GetIcon(contents, GetPreferredSize());
if (!icon.IsEmpty())
SetImage(*icon.ToImageSkia());
SetVisible(true);
}
-void PageActionImageView::PaintChildren(const ui::PaintContext& context) {
- View::PaintChildren(context);
- int tab_id = SessionTabHelper::IdForTab(GetCurrentWebContents());
- if (tab_id >= 0) {
- ui::PaintRecorder recorder(context);
- view_controller_->extension_action()->PaintBadge(recorder.canvas(),
- GetLocalBounds(), tab_id);
- }
-}
-
void PageActionImageView::UpdateState() {
UpdateVisibility(GetCurrentWebContents());
}

Powered by Google App Engine
This is Rietveld 408576698