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

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: Address comments. Created 5 years, 9 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..e55de566e6a721954659784aa63f695652ac8cf1 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:
@@ -63,6 +65,9 @@ class AvatarMenuButton : public views::MenuButton,
bool* is_rectangle);
private:
+ // AvatarBaseButton:
+ void Update() override;
+
// views::ViewTargeterDelegate:
bool DoesIntersectRect(const views::View* target,
const gfx::Rect& rect) const override;
@@ -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_;

Powered by Google App Engine
This is Rietveld 408576698