OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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_JUMPLIST_WIN_H_ | 5 #ifndef CHROME_BROWSER_JUMPLIST_WIN_H_ |
6 #define CHROME_BROWSER_JUMPLIST_WIN_H_ | 6 #define CHROME_BROWSER_JUMPLIST_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 void OnSegmentUsageAvailable(CancelableRequestProvider::Handle handle, | 153 void OnSegmentUsageAvailable(CancelableRequestProvider::Handle handle, |
154 std::vector<PageUsageData*>* data); | 154 std::vector<PageUsageData*>* data); |
155 | 155 |
156 // A callback function for HistoryService that notify when a requested favicon | 156 // A callback function for HistoryService that notify when a requested favicon |
157 // is available. | 157 // is available. |
158 // To avoid file operations, this function just attaches the given data to | 158 // To avoid file operations, this function just attaches the given data to |
159 // a ShellLinkItem object. | 159 // a ShellLinkItem object. |
160 // When finishing loading all favicons, this function posts a task that | 160 // When finishing loading all favicons, this function posts a task that |
161 // decompresses collected favicons and updates a JumpList. | 161 // decompresses collected favicons and updates a JumpList. |
162 void OnFaviconDataAvailable(HistoryService::Handle handle, | 162 void OnFaviconDataAvailable(HistoryService::Handle handle, |
163 bool know_favicon, | 163 history::FaviconData favicon); |
164 scoped_refptr<RefCountedMemory> data, | |
165 bool expired, | |
166 GURL icon_url); | |
167 | 164 |
168 private: | 165 private: |
169 // Our consumers for HistoryService. | 166 // Our consumers for HistoryService. |
170 CancelableRequestConsumer most_visited_consumer_; | 167 CancelableRequestConsumer most_visited_consumer_; |
171 CancelableRequestConsumer favicon_consumer_; | 168 CancelableRequestConsumer favicon_consumer_; |
172 | 169 |
173 // The Profile object used for listening its events. | 170 // The Profile object used for listening its events. |
174 Profile* profile_; | 171 Profile* profile_; |
175 | 172 |
176 // App id to associate with the jump list. | 173 // App id to associate with the jump list. |
177 std::wstring app_id_; | 174 std::wstring app_id_; |
178 | 175 |
179 // The directory which contains JumpList icons. | 176 // The directory which contains JumpList icons. |
180 FilePath icon_dir_; | 177 FilePath icon_dir_; |
181 | 178 |
182 // Items in the "Most Visited" category of the application JumpList. | 179 // Items in the "Most Visited" category of the application JumpList. |
183 ShellLinkItemList most_visited_pages_; | 180 ShellLinkItemList most_visited_pages_; |
184 | 181 |
185 // Items in the "Recently Closed" category of the application JumpList. | 182 // Items in the "Recently Closed" category of the application JumpList. |
186 ShellLinkItemList recently_closed_pages_; | 183 ShellLinkItemList recently_closed_pages_; |
187 | 184 |
188 // A list of URLs we need to retrieve their favicons. | 185 // A list of URLs we need to retrieve their favicons. |
189 typedef std::pair<std::string, scoped_refptr<ShellLinkItem> > URLPair; | 186 typedef std::pair<std::string, scoped_refptr<ShellLinkItem> > URLPair; |
190 std::list<URLPair> icon_urls_; | 187 std::list<URLPair> icon_urls_; |
191 }; | 188 }; |
192 | 189 |
193 #endif // CHROME_BROWSER_JUMPLIST_WIN_H_ | 190 #endif // CHROME_BROWSER_JUMPLIST_WIN_H_ |
OLD | NEW |