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

Unified Diff: chrome/browser/ui/views/avatar_menu_button.cc

Issue 10453101: Convert most of the rest of chrome to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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/avatar_menu_button.cc
diff --git a/chrome/browser/ui/views/avatar_menu_button.cc b/chrome/browser/ui/views/avatar_menu_button.cc
index 532f795b8033157c79991bce0c98529e2bb7ee90..154c97f0cc968190bdc25386cfcb0a52301a8e3c 100644
--- a/chrome/browser/ui/views/avatar_menu_button.cc
+++ b/chrome/browser/ui/views/avatar_menu_button.cc
@@ -69,7 +69,7 @@ void DrawTaskBarDecoration(gfx::NativeWindow window, const gfx::Image* image) {
profiles::kAvatarIconWidth - x * 2, profiles::kAvatarIconHeight));
source_bitmap = &squarer_bitmap;
} else {
- // The bitmaps size has changed. Resize what we have.
+ // The image's size has changed. Resize what we have.
source_bitmap = bitmap;
}
// Since the target size is so small, we use our best resizer. Never pass
@@ -108,7 +108,7 @@ void AvatarMenuButton::OnPaint(gfx::Canvas* canvas) {
if (old_height_ != height() || button_icon_.isNull()) {
old_height_ = height();
button_icon_ = *profiles::GetAvatarIconForTitleBar(
- *icon_, is_gaia_picture_, width(), height()).ToSkBitmap();
+ *icon_, is_gaia_picture_, width(), height()).ToImageSkia();
}
// Scale the image to fit the width of the button.
@@ -141,7 +141,7 @@ bool AvatarMenuButton::HitTest(const gfx::Point& point) const {
void AvatarMenuButton::SetAvatarIcon(const gfx::Image& icon,
bool is_gaia_picture) {
icon_.reset(new gfx::Image(icon));
- button_icon_ = SkBitmap();
+ button_icon_ = gfx::ImageSkia();
is_gaia_picture_ = is_gaia_picture;
SchedulePaint();
}
« no previous file with comments | « chrome/browser/ui/views/avatar_menu_button.h ('k') | chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698