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

Unified Diff: chrome/browser/jumplist_win.h

Issue 660813002: [Win] Add a fast profile switcher to the Windows taskbar item. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile Created 6 years, 1 month 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/jumplist_win.h
diff --git a/chrome/browser/jumplist_win.h b/chrome/browser/jumplist_win.h
index 854ab6b6b4c3fbb872ec3d8dd2663016ae76a2ad..d14335bd2f91763565e6002e7652e3563942c463 100644
--- a/chrome/browser/jumplist_win.h
+++ b/chrome/browser/jumplist_win.h
@@ -17,6 +17,8 @@
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/jumplist_updater_win.h"
#include "chrome/browser/prefs/incognito_mode_prefs.h"
+#include "chrome/browser/profiles/avatar_menu.h"
+#include "chrome/browser/profiles/avatar_menu_observer.h"
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/sessions/tab_restore_service_observer.h"
#include "components/history/core/browser/history_types.h"
@@ -53,6 +55,7 @@ class Profile;
// always delete JumpList on UI thread (the same thread it got constructed on).
class JumpList : public TabRestoreServiceObserver,
public content::NotificationObserver,
+ public AvatarMenuObserver,
public base::RefCountedThreadSafe<
JumpList, content::BrowserThread::DeleteOnUIThread> {
public:
@@ -71,6 +74,9 @@ class JumpList : public TabRestoreServiceObserver,
// is destroyed.
virtual void TabRestoreServiceDestroyed(TabRestoreService* service);
+ // Overridden from AvatarMenuObserver:
+ virtual void OnAvatarMenuChanged(AvatarMenu* avatar_menu) override;
tapted 2014/11/03 23:57:06 nit: I think this will eventually lose the `virtua
noms (inactive) 2014/11/04 20:03:09 Done. Cleaned up the other ones too.
+
// Cancel a pending jumplist update.
void CancelPendingUpdate();
@@ -134,6 +140,10 @@ class JumpList : public TabRestoreServiceObserver,
// loaded icons.
void CreateIconFiles(const ShellLinkItemList& item_list);
+ // Update the cached list of profile avatars to be used as the Profiles
+ // category JumpList icons.
+ void UpdateProfileAvatars();
+
// Tracks FaviconService tasks.
base::CancelableTaskTracker cancelable_task_tracker_;
@@ -174,6 +184,11 @@ class JumpList : public TabRestoreServiceObserver,
// For callbacks may be run after destruction.
base::WeakPtrFactory<JumpList> weak_ptr_factory_;
+ scoped_ptr<AvatarMenu> avatar_menu_;
tapted 2014/11/03 23:57:06 nit: comment? (for consistency - it looks lonely)
noms (inactive) 2014/11/04 20:03:09 Done.
+
+ // Profile avatars used as icons by the items in the Profiles category.
+ std::vector<gfx::Image> profile_avatars_;
+
DISALLOW_COPY_AND_ASSIGN(JumpList);
};

Powered by Google App Engine
This is Rietveld 408576698