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

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

Issue 2851543002: Update avatar button to MD (part 1) (Closed)
Patch Set: 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..d9903879e32d23a8c38e4a58a3cfa6e65bb86fb7 100644
--- a/chrome/browser/ui/views/frame/avatar_button_manager.h
+++ b/chrome/browser/ui/views/frame/avatar_button_manager.h
@@ -7,6 +7,7 @@
#include "chrome/browser/ui/views/profiles/avatar_button_delegate.h"
#include "chrome/browser/ui/views/profiles/avatar_button_style.h"
+#include "chrome/browser/ui/views/profiles/new_avatar_button.h"
class BrowserNonClientFrameView;
@@ -20,21 +21,20 @@ 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_; }
- private:
// AvatarButtonDelegate:
void ButtonPreferredSizeChanged() override;
+ void OnMenuButtonClicked(views::MenuButton* source,
+ const gfx::Point& point,
+ const ui::Event* event) override;
- // views::ButtonListener:
- void ButtonPressed(views::Button* sender, const ui::Event& event) override;
-
+ private:
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.
Evan Stade 2017/04/27 17:15:02 Is changing the type necessary?
emx 2017/04/28 12:39:39 I think so, because I need to call AvatarButton::U
DISALLOW_COPY_AND_ASSIGN(AvatarButtonManager);
};

Powered by Google App Engine
This is Rietveld 408576698