| Index: chrome/browser/jumplist_win.h
|
| diff --git a/chrome/browser/jumplist_win.h b/chrome/browser/jumplist_win.h
|
| index 854ab6b6b4c3fbb872ec3d8dd2663016ae76a2ad..0f9a7fb8c8545dd67d5bd71ec0d1ccc8431f45b4 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,23 +55,27 @@ 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:
|
| explicit JumpList(Profile* profile);
|
|
|
| // NotificationObserver implementation.
|
| - virtual void Observe(int type,
|
| - const content::NotificationSource& source,
|
| - const content::NotificationDetails& details);
|
| + void Observe(int type,
|
| + const content::NotificationSource& source,
|
| + const content::NotificationDetails& details) override;
|
|
|
| // Observer callback for TabRestoreService::Observer to notify when a tab is
|
| // added or removed.
|
| - virtual void TabRestoreServiceChanged(TabRestoreService* service);
|
| + void TabRestoreServiceChanged(TabRestoreService* service) override;
|
|
|
| // Observer callback to notice when our associated TabRestoreService
|
| // is destroyed.
|
| - virtual void TabRestoreServiceDestroyed(TabRestoreService* service);
|
| + void TabRestoreServiceDestroyed(TabRestoreService* service) override;
|
| +
|
| + // Overridden from AvatarMenuObserver:
|
| + void OnAvatarMenuChanged(AvatarMenu* avatar_menu) override;
|
|
|
| // Cancel a pending jumplist update.
|
| void CancelPendingUpdate();
|
| @@ -128,12 +134,17 @@ class JumpList : public TabRestoreServiceObserver,
|
|
|
| // Runnable method that updates the jumplist, once all the data
|
| // has been fetched.
|
| - void RunUpdate(IncognitoModePrefs::Availability incognito_availability);
|
| + void RunUpdateOnFileThread(
|
| + IncognitoModePrefs::Availability incognito_availability);
|
|
|
| // Helper method for RunUpdate to create icon files for the asynchrounously
|
| // loaded icons.
|
| void CreateIconFiles(const ShellLinkItemList& item_list);
|
|
|
| + // Called when the list of Profiles has changed. This function updates the
|
| + // |profile_switcher_| ShellLinkItemList.
|
| + void UpdateProfileSwitcher();
|
| +
|
| // Tracks FaviconService tasks.
|
| base::CancelableTaskTracker cancelable_task_tracker_;
|
|
|
| @@ -158,6 +169,10 @@ class JumpList : public TabRestoreServiceObserver,
|
| // protected by the list_lock_.
|
| ShellLinkItemList recently_closed_pages_;
|
|
|
| + // Items in the "People" category of the application JumpList, protected
|
| + // by the list_lock_.
|
| + ShellLinkItemList profile_switcher_;
|
| +
|
| // A list of URLs we need to retrieve their favicons,
|
| // protected by the list_lock_.
|
| typedef std::pair<std::string, scoped_refptr<ShellLinkItem> > URLPair;
|
| @@ -174,6 +189,13 @@ class JumpList : public TabRestoreServiceObserver,
|
| // For callbacks may be run after destruction.
|
| base::WeakPtrFactory<JumpList> weak_ptr_factory_;
|
|
|
| + // Contains data about existing Profiles.
|
| + scoped_ptr<AvatarMenu> avatar_menu_;
|
| +
|
| + // Whether the experiment that is replacing "Most Visited" category with a
|
| + // "People" category is enabled.
|
| + bool use_profiles_category_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(JumpList);
|
| };
|
|
|
|
|