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

Side by Side Diff: chrome/browser/win/jumplist.h

Issue 2200993004: Make TabRestoreService::Entry noncopyable and fix up surrounding code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tab-test-cleanup
Patch Set: Get session ID from entries, take tabs' active status directly instead of an index Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/views/frame/global_menu_bar_x11.cc ('k') | chrome/browser/win/jumplist.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_WIN_JUMPLIST_H_ 5 #ifndef CHROME_BROWSER_WIN_JUMPLIST_H_
6 #define CHROME_BROWSER_WIN_JUMPLIST_H_ 6 #define CHROME_BROWSER_WIN_JUMPLIST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 static bool Enabled(); 109 static bool Enabled();
110 110
111 private: 111 private:
112 friend class base::RefCounted<JumpList>; 112 friend class base::RefCounted<JumpList>;
113 ~JumpList() override; 113 ~JumpList() override;
114 114
115 // Creates a ShellLinkItem object from a tab (or a window) and add it to the 115 // Creates a ShellLinkItem object from a tab (or a window) and add it to the
116 // given list. 116 // given list.
117 // These functions are copied from the RecentlyClosedTabsHandler class for 117 // These functions are copied from the RecentlyClosedTabsHandler class for
118 // compatibility with the new-tab page. 118 // compatibility with the new-tab page.
119 bool AddTab(const sessions::TabRestoreService::Tab* tab, 119 bool AddTab(const sessions::TabRestoreService::Tab& tab,
120 ShellLinkItemList* list, 120 ShellLinkItemList* list,
121 size_t max_items); 121 size_t max_items);
122 void AddWindow(const sessions::TabRestoreService::Window* window, 122 void AddWindow(const sessions::TabRestoreService::Window& window,
123 ShellLinkItemList* list, 123 ShellLinkItemList* list,
124 size_t max_items); 124 size_t max_items);
125 125
126 // Starts loading a favicon for each URL in |icon_urls_|. 126 // Starts loading a favicon for each URL in |icon_urls_|.
127 // This function sends a query to HistoryService. 127 // This function sends a query to HistoryService.
128 // When finishing loading all favicons, this function posts a task that 128 // When finishing loading all favicons, this function posts a task that
129 // decompresses collected favicons and updates a JumpList. 129 // decompresses collected favicons and updates a JumpList.
130 void StartLoadingFavicon(); 130 void StartLoadingFavicon();
131 131
132 // A callback function for HistoryService that notify when a requested favicon 132 // A callback function for HistoryService that notify when a requested favicon
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // comes in before it finishes. 184 // comes in before it finishes.
185 base::CancelableTaskTracker::TaskId task_id_; 185 base::CancelableTaskTracker::TaskId task_id_;
186 186
187 // For callbacks may be run after destruction. 187 // For callbacks may be run after destruction.
188 base::WeakPtrFactory<JumpList> weak_ptr_factory_; 188 base::WeakPtrFactory<JumpList> weak_ptr_factory_;
189 189
190 DISALLOW_COPY_AND_ASSIGN(JumpList); 190 DISALLOW_COPY_AND_ASSIGN(JumpList);
191 }; 191 };
192 192
193 #endif // CHROME_BROWSER_WIN_JUMPLIST_H_ 193 #endif // CHROME_BROWSER_WIN_JUMPLIST_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/global_menu_bar_x11.cc ('k') | chrome/browser/win/jumplist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698