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

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

Issue 24647003: Redesign of the avatar menu button. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better fix for app/popup browser crash Created 7 years, 2 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/browser_non_client_frame_view.h
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view.h b/chrome/browser/ui/views/frame/browser_non_client_frame_view.h
index 91a9b0dc951889258aa22e1bb2b822712829b38f..681a06e7a447f457f0470ea25f157272e3302bef 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view.h
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view.h
@@ -5,12 +5,14 @@
#ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_
#define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_
+#include "chrome/browser/ui/views/new_avatar_button.h"
#include "ui/views/window/non_client_view.h"
class AvatarLabel;
class AvatarMenuButton;
class BrowserFrame;
class BrowserView;
+class NewAvatarButton;
// A specialization of the NonClientFrameView object that provides additional
// Browser-specific methods.
@@ -34,6 +36,8 @@ class BrowserNonClientFrameView : public views::NonClientFrameView {
AvatarMenuButton* avatar_button() const { return avatar_button_; }
+ NewAvatarButton* new_avatar_button() const { return new_avatar_button_; }
+
AvatarLabel* avatar_label() const { return avatar_label_; }
// Returns the bounds within which the TabStrip should be laid out.
@@ -62,6 +66,16 @@ class BrowserNonClientFrameView : public views::NonClientFrameView {
// Updates the title and icon of the avatar button.
void UpdateAvatarInfo();
+ // Updates the title of the avatar button displayed in the caption area.
+ // The button uses |style| to match the browser window style and notifies
+ // |listener| when it is clicked.
+ void UpdateNewStyleAvatarInfo(views::ButtonListener* listener,
+ const NewAvatarButton::AvatarButtonStyle style);
+
+ // Anchor and show the ProfileChooser bubble under the avatar button in
+ // the caption area.
+ void ShowProfileChooserViewBubble();
+
private:
// The frame that hosts this view.
BrowserFrame* frame_;
@@ -75,6 +89,10 @@ class BrowserNonClientFrameView : public views::NonClientFrameView {
// Avatar label that is used for a managed user.
AvatarLabel* avatar_label_;
+
+ // 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.
+ NewAvatarButton* new_avatar_button_;
};
namespace chrome {
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame.cc ('k') | chrome/browser/ui/views/frame/browser_non_client_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698