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

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

Issue 895803003: [Profiles] Remove the NotificationService from the ProfileInfoCache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clean up views code Created 5 years, 10 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 43c820aeb4812fd0fac85db9a1f124b673d9f17a..679f89bc1386c95ff3877d773253682148db3d3a 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
@@ -52,6 +52,8 @@ class BrowserNonClientFrameView : public views::NonClientFrameView,
// Updates the throbber.
virtual void UpdateThrobber(bool running) = 0;
+ virtual void UpdateNewStyleAvatar() = 0;
+
// Updates any toolbar components in the frame. The default implementation
// does nothing.
virtual void UpdateToolbar();
@@ -66,6 +68,11 @@ class BrowserNonClientFrameView : public views::NonClientFrameView,
BrowserView* browser_view() const { return browser_view_; }
BrowserFrame* frame() const { return frame_; }
+ // Updates the avatar button using the old or new UI based on the BrowserView
+ // type, and the presence of the --enable-new-avatar-menu flag. Calls either
+ // UpdateAvatarInfo() or UpdateNewStyleAvatar() accordingly.
+ void UpdateAvatar();
+
// Updates the title and icon of the avatar button.
void UpdateAvatarInfo();
noms 2015/02/20 21:24:34 For what it's worth, I have a plan of renaming the
@@ -76,16 +83,16 @@ class BrowserNonClientFrameView : public views::NonClientFrameView,
const NewAvatarButton::AvatarButtonStyle style);
private:
- // Draws a taskbar icon if avatar are enabled, erases it otherwise. If
- // |taskbar_badge_avatar| is null, then |avatar| is used.
- void DrawTaskbarDecoration(const gfx::Image& avatar,
- const gfx::Image& taskbar_badge_avatar);
-
// Overriden from ProfileInfoCacheObserver.
void OnProfileAdded(const base::FilePath& profile_path) override;
void OnProfileWasRemoved(const base::FilePath& profile_path,
const base::string16& profile_name) override;
void OnProfileAvatarChanged(const base::FilePath& profile_path) override;
+ void OnProfileNameChanged(const base::FilePath& profile_path,
+ const base::string16& old_profile_name) override;
+
+ // Draws a taskbar icon if avatars are enabled, erases it otherwise.
+ void BrowserNonClientFrameView::UpdateTaskbarDecoration();
sky 2015/02/20 21:43:19 nuke BrowserNonClientFrameView::.
noms 2015/02/23 15:46:52 oops! done.
// The frame that hosts this view.
BrowserFrame* frame_;

Powered by Google App Engine
This is Rietveld 408576698