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

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

Issue 8709001: Views: Custom drawing for GAIA avatar pictures (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/views/avatar_menu_bubble_view.cc ('k') | chrome/browser/ui/views/avatar_menu_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/avatar_menu_button.h
diff --git a/chrome/browser/ui/views/avatar_menu_button.h b/chrome/browser/ui/views/avatar_menu_button.h
index 2bd6a328d0a08961664478b136ed0a45ab52c07b..0eb5223bcbebeaacea3720efe9598ad3ae725fd1 100644
--- a/chrome/browser/ui/views/avatar_menu_button.h
+++ b/chrome/browser/ui/views/avatar_menu_button.h
@@ -15,6 +15,7 @@
namespace gfx {
class Canvas;
+class Image;
}
class Browser;
@@ -36,8 +37,8 @@ class AvatarMenuButton : public views::MenuButton,
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
virtual bool HitTest(const gfx::Point& point) const OVERRIDE;
- // views::TextButton
- virtual void SetIcon(const SkBitmap& icon) OVERRIDE;
+ virtual void SetIcon(const gfx::Image& icon,
+ bool is_gaia_picture);
void ShowAvatarBubble();
@@ -50,6 +51,12 @@ class AvatarMenuButton : public views::MenuButton,
bool set_taskbar_decoration_;
scoped_ptr<ui::MenuModel> menu_model_;
+ // Use a scoped ptr because gfx::Image doesn't have a default constructor.
+ scoped_ptr<gfx::Image> icon_;
+ SkBitmap button_icon_;
+ bool is_gaia_picture_;
+ int old_height_;
+
DISALLOW_COPY_AND_ASSIGN(AvatarMenuButton);
};
« no previous file with comments | « chrome/browser/ui/views/avatar_menu_bubble_view.cc ('k') | chrome/browser/ui/views/avatar_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698