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

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

Issue 678553002: Badge icons in windows task bar with avatar icon. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move code Created 6 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 32a1ad4a764eb58fc542ab89988798dfd688457b..832ec385747704cc93cea3c468d0d858facfe294 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
@@ -18,7 +18,8 @@ class NewAvatarButton;
// A specialization of the NonClientFrameView object that provides additional
// Browser-specific methods.
-class BrowserNonClientFrameView : public views::NonClientFrameView {
+class BrowserNonClientFrameView : public views::NonClientFrameView,
+ public ProfileInfoCacheObserver {
public:
BrowserNonClientFrameView(BrowserFrame* frame, BrowserView* browser_view);
virtual ~BrowserNonClientFrameView();
@@ -69,6 +70,14 @@ 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 OnProfileAvatarChanged(const base::FilePath& profile_path) override;
+
// The frame that hosts this view.
BrowserFrame* frame_;

Powered by Google App Engine
This is Rietveld 408576698