OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |