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

Unified Diff: chrome/browser/ui/gtk/avatar_menu_button_gtk.h

Issue 8708001: GTK: 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 | « no previous file | chrome/browser/ui/gtk/avatar_menu_button_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/avatar_menu_button_gtk.h
diff --git a/chrome/browser/ui/gtk/avatar_menu_button_gtk.h b/chrome/browser/ui/gtk/avatar_menu_button_gtk.h
index b6518b0a3ec531d58f77080cc410946900af2ce2..413645b01a92acbb01c6cd36353f7db2693a773d 100644
--- a/chrome/browser/ui/gtk/avatar_menu_button_gtk.h
+++ b/chrome/browser/ui/gtk/avatar_menu_button_gtk.h
@@ -8,6 +8,7 @@
#include <gtk/gtk.h>
+#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/gtk/owned_widget_gtk.h"
@@ -15,6 +16,10 @@
class Browser;
class SkBitmap;
+namespace gfx {
+class Image;
+}
+
// A button used to show the profile avatar. When clicked, it opens the
// AvatarMenuBubbleGtk.
class AvatarMenuButtonGtk {
@@ -32,7 +37,7 @@ class AvatarMenuButtonGtk {
}
// Sets the image to display on the button, typically the profile icon.
- void SetIcon(const SkBitmap &icon);
+ void SetIcon(const gfx::Image& icon, bool is_gaia_picture);
// Show the avatar bubble.
void ShowAvatarBubble();
@@ -40,6 +45,10 @@ class AvatarMenuButtonGtk {
private:
CHROMEGTK_CALLBACK_1(AvatarMenuButtonGtk, gboolean, OnButtonPressed,
GdkEventButton*);
+ CHROMEGTK_CALLBACK_1(AvatarMenuButtonGtk, void, OnSizeAllocate,
+ GtkAllocation*);
+
+ void UpdateButtonIcon();
// The button widget.
ui::OwnedWidgetGtk widget_;
@@ -53,6 +62,10 @@ class AvatarMenuButtonGtk {
// Which side of the bubble to display the arrow.
BubbleGtk::ArrowLocationGtk arrow_location_;
+ scoped_ptr<gfx::Image> icon_;
+ bool is_gaia_picture_;
+ int old_height_;
+
DISALLOW_COPY_AND_ASSIGN(AvatarMenuButtonGtk);
};
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/avatar_menu_button_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698