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

Unified Diff: chrome/browser/win/jumplist.h

Issue 2836873003: Update different JumpList categories on demand (Closed)
Patch Set: Address comments Created 3 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/win/jumplist.cc » ('j') | chrome/browser/win/jumplist.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/win/jumplist.h
diff --git a/chrome/browser/win/jumplist.h b/chrome/browser/win/jumplist.h
index 0279af26e198153fccf2f13c6de8a501aa8f4cfa..ee87d41a7368f78b8454fbb10d78f047195f4eb1 100644
--- a/chrome/browser/win/jumplist.h
+++ b/chrome/browser/win/jumplist.h
@@ -115,15 +115,16 @@ class JumpList : public sessions::TabRestoreServiceObserver,
explicit JumpList(Profile* profile); // Use JumpListFactory instead
~JumpList() override;
- // Creates a ShellLinkItem object from a tab (or a window) and add it to the
- // given list.
// These functions are copied from the RecentlyClosedTabsHandler class for
// compatibility with the new-tab page.
+ // AddTab creates a ShellLinkItem object from a tab and add it to |data|.
bool AddTab(const sessions::TabRestoreService::Tab& tab,
- ShellLinkItemList* list,
+ JumpListData* data,
size_t max_items);
+ // Creates a ShellLinkItem object for each tab in the given |window| and add
+ // to |data|.
void AddWindow(const sessions::TabRestoreService::Window& window,
- ShellLinkItemList* list,
+ JumpListData* data,
size_t max_items);
// Starts loading a favicon for each URL in |icon_urls_|.
@@ -176,6 +177,14 @@ class JumpList : public sessions::TabRestoreServiceObserver,
// The directory which contains JumpList icons.
base::FilePath icon_dir_;
+ // A boolean flag indicating if "Most Visited" category of the JumpList should
+ // be updated or not.
+ bool should_update_most_visited_;
+
+ // A boolean flag indicating if "Recently Closed" category of the JumpList
+ // should be updated or not.
+ bool should_update_recent_closed_;
+
// Timer for requesting delayed updates of the jumplist.
base::OneShotTimer timer_;
@@ -186,11 +195,12 @@ class JumpList : public sessions::TabRestoreServiceObserver,
// comes in before it finishes.
base::CancelableTaskTracker::TaskId task_id_;
- // A task runner running tasks to update the jumplist in JumpListIcons.
- scoped_refptr<base::SingleThreadTaskRunner> update_jumplisticons_task_runner_;
+ // A task runner running tasks to update the JumpList.
+ scoped_refptr<base::SingleThreadTaskRunner> update_jumplist_task_runner_;
- // A task runner running tasks to delete JumpListIconsOld directory.
- scoped_refptr<base::SequencedTaskRunner> delete_jumplisticonsold_task_runner_;
+ // A task runner running tasks to delete JumpListIcons directory and
+ // JumpListIconsOld directory.
+ scoped_refptr<base::SequencedTaskRunner> delete_jumplisticons_task_runner_;
// For callbacks may be run after destruction.
base::WeakPtrFactory<JumpList> weak_ptr_factory_;
« no previous file with comments | « no previous file | chrome/browser/win/jumplist.cc » ('j') | chrome/browser/win/jumplist.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698