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

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

Issue 1009403002: Refactor the avatar button/icon class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 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/profiles/avatar_menu_button.h
diff --git a/chrome/browser/ui/views/profiles/avatar_menu_button.h b/chrome/browser/ui/views/profiles/avatar_menu_button.h
index 343e4670fda9704f7f6058763a114ec1241d9233..8224185954d9716e08c2a7cbda62af35e80e9f71 100644
--- a/chrome/browser/ui/views/profiles/avatar_menu_button.h
+++ b/chrome/browser/ui/views/profiles/avatar_menu_button.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/compiler_specific.h"
+#include "chrome/browser/ui/views/profiles/avatar_base_button.h"
#include "ui/base/models/simple_menu_model.h"
#include "ui/views/controls/button/menu_button.h"
#include "ui/views/controls/button/menu_button_listener.h"
@@ -25,7 +26,8 @@ class Profile;
// A button used to show either the incognito avatar or the profile avatar.
// The button can optionally have a menu attached to it.
-class AvatarMenuButton : public views::MenuButton,
+class AvatarMenuButton : public AvatarBaseButton,
+ public views::MenuButton,
public views::MenuButtonListener,
public views::ViewTargeterDelegate {
public:
@@ -61,6 +63,9 @@ class AvatarMenuButton : public views::MenuButton,
gfx::Image* avatar,
gfx::Image* taskbar_badge_avatar,
bool* is_rectangle);
+ protected:
+ // AvatarBaseButton:
+ void Update() override;
private:
// views::ViewTargeterDelegate:
@@ -71,7 +76,6 @@ class AvatarMenuButton : public views::MenuButton,
void OnMenuButtonClicked(views::View* source,
const gfx::Point& point) override;
- Browser* browser_;
bool disabled_;
scoped_ptr<ui::MenuModel> menu_model_;
« no previous file with comments | « chrome/browser/ui/views/profiles/avatar_base_button.cc ('k') | chrome/browser/ui/views/profiles/avatar_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698