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

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

Issue 1972033002: Simplify some old avatar menu button code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reinstate ash browser test fix Created 4 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/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 5ea8e7c6f736b20cb92dc24df3bcbe4c173410dd..431620b9d22096fb1850026486d49cd23d4bad5f 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
@@ -6,9 +6,9 @@
#define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_H_
#include "chrome/browser/profiles/profile_attributes_storage.h"
+#include "chrome/browser/ui/views/profiles/profile_indicator_icon.h"
#include "ui/views/window/non_client_view.h"
-class AvatarMenuButton;
class BrowserFrame;
class BrowserView;
@@ -22,7 +22,6 @@ class BrowserNonClientFrameView : public views::NonClientFrameView,
BrowserView* browser_view() const { return browser_view_; }
BrowserFrame* frame() const { return frame_; }
- AvatarMenuButton* avatar_button() const { return avatar_button_; }
// Called when BrowserView creates all it's child views.
virtual void OnBrowserViewInitViewsComplete();
@@ -82,12 +81,19 @@ class BrowserNonClientFrameView : public views::NonClientFrameView,
gfx::ImageSkia GetFrameImage() const;
gfx::ImageSkia GetFrameOverlayImage() const;
- // Update the profile switcher button if one should exist. Otherwise, update
- // the incognito avatar, or profile avatar for teleported frames in ChromeOS.
- virtual void UpdateAvatar() = 0;
+ // Updates the profile switcher button if one should exist. Otherwise, updates
+ // the icon that indicates incognito (or a teleported window in ChromeOS).
+ virtual void UpdateProfileIcons() = 0;
- // Updates the title and icon of the old avatar button.
- void UpdateOldAvatarButton();
+ // Updates the icon that indicates incognito/teleportation state.
+ void UpdateProfileIndicatorIcon();
+
+ const views::View* profile_indicator_icon() const {
+ return profile_indicator_icon_;
+ }
+ views::View* profile_indicator_icon() {
+ return profile_indicator_icon_;
+ }
private:
// views::NonClientFrameView:
@@ -114,9 +120,9 @@ class BrowserNonClientFrameView : public views::NonClientFrameView,
// The BrowserView hosted within this View.
BrowserView* browser_view_;
- // Menu button that displays the incognito icon. May be null for some frame
- // styles. TODO(anthonyvd): simplify/rename.
- AvatarMenuButton* avatar_button_ = nullptr;
+ // On desktop, this is used to show an incognito icon. On CrOS, it's also used
+ // for teleported windows (in multi-profile mode).
+ ProfileIndicatorIcon* profile_indicator_icon_;
DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameView);
};
« 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