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

Unified Diff: chrome/browser/ui/views/frame/avatar_button_manager.h

Issue 2832823002: Update avatar button to MD (Closed)
Patch Set: Rebased on CL 2833363002 Created 3 years, 8 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/frame/avatar_button_manager.h
diff --git a/chrome/browser/ui/views/frame/avatar_button_manager.h b/chrome/browser/ui/views/frame/avatar_button_manager.h
index ca3aa5bdf0cd895fb93f0f53f55adc94ac0071ee..5bbe9f36ef2ff2fe43b317f2ea4a28880edc50e1 100644
--- a/chrome/browser/ui/views/frame/avatar_button_manager.h
+++ b/chrome/browser/ui/views/frame/avatar_button_manager.h
@@ -7,6 +7,8 @@
#include "chrome/browser/ui/views/profiles/avatar_button_delegate.h"
#include "chrome/browser/ui/views/profiles/avatar_button_style.h"
Peter Kasting 2017/04/26 02:09:53 Nit: Seems like you could forward-declare AvatarBu
+#include "chrome/browser/ui/views/profiles/new_avatar_button.h"
+#include "ui/views/controls/button/menu_button.h"
Peter Kasting 2017/04/26 02:09:53 Nit: Seems like you shouldn't need this (we should
emx 2017/04/27 16:30:58 Done.
class BrowserNonClientFrameView;
@@ -20,21 +22,22 @@ class AvatarButtonManager : public AvatarButtonDelegate {
// properties.
void Update(AvatarButtonStyle style);
- // Gets the avatar button as a view::View.
- views::View* view() const { return view_; }
+ AvatarButton* button() const { return button_; }
Peter Kasting 2017/04/26 02:09:53 Const methods should not return non-const pointers
- private:
// AvatarButtonDelegate:
void ButtonPreferredSizeChanged() override;
- // views::ButtonListener:
- void ButtonPressed(views::Button* sender, const ui::Event& event) override;
+ private:
+ // views::MenuButtonListener:
Peter Kasting 2017/04/26 02:09:53 Nit: You don't directly inherit from AvatarButtonD
emx 2017/04/27 16:30:58 Done.
+ void OnMenuButtonClicked(views::MenuButton* source,
+ const gfx::Point& point,
+ const ui::Event* event) override;
BrowserNonClientFrameView* frame_view_; // Weak. Owns |this|.
// Menu button that displays the name of the active or guest profile.
// May be null and will not be displayed for off the record profiles.
- views::View* view_; // Owned by views hierarchy.
+ AvatarButton* button_; // Owned by views hierarchy.
DISALLOW_COPY_AND_ASSIGN(AvatarButtonManager);
};

Powered by Google App Engine
This is Rietveld 408576698