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 COMPONENTS_FAVICON_CORE_FAVICON_SERVICE_H_ | 5 #ifndef COMPONENTS_FAVICON_CORE_FAVICON_SERVICE_H_ |
6 #define COMPONENTS_FAVICON_CORE_FAVICON_SERVICE_H_ | 6 #define COMPONENTS_FAVICON_CORE_FAVICON_SERVICE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 // multiple favicon bitmaps for |favicon_id|, the largest favicon bitmap is | 164 // multiple favicon bitmaps for |favicon_id|, the largest favicon bitmap is |
165 // returned. | 165 // returned. |
166 base::CancelableTaskTracker::TaskId GetLargestRawFaviconForID( | 166 base::CancelableTaskTracker::TaskId GetLargestRawFaviconForID( |
167 favicon_base::FaviconID favicon_id, | 167 favicon_base::FaviconID favicon_id, |
168 const favicon_base::FaviconRawBitmapCallback& callback, | 168 const favicon_base::FaviconRawBitmapCallback& callback, |
169 base::CancelableTaskTracker* tracker); | 169 base::CancelableTaskTracker* tracker); |
170 | 170 |
171 // Marks all types of favicon for the page as being out of date. | 171 // Marks all types of favicon for the page as being out of date. |
172 void SetFaviconOutOfDateForPage(const GURL& page_url); | 172 void SetFaviconOutOfDateForPage(const GURL& page_url); |
173 | 173 |
174 // Clones all icons from an existing page. This associates the icons from | |
175 // |old_page_url| with |new_page_url|, provided |new_page_url| has no | |
176 // recorded associations to any other icons. | |
177 // Needed if you want to declare favicons (tentatively) in advance, before a | |
178 // page is ever visited. | |
179 void CloneFavicon(const GURL& old_page_url, const GURL& new_page_url); | |
180 | |
181 // Allows the importer to set many favicons for many pages at once. The pages | 174 // Allows the importer to set many favicons for many pages at once. The pages |
182 // must exist, any favicon sets for unknown pages will be discarded. Existing | 175 // must exist, any favicon sets for unknown pages will be discarded. Existing |
183 // favicons will not be overwritten. | 176 // favicons will not be overwritten. |
184 void SetImportedFavicons( | 177 void SetImportedFavicons( |
185 const favicon_base::FaviconUsageDataList& favicon_usage); | 178 const favicon_base::FaviconUsageDataList& favicon_usage); |
186 | 179 |
187 // Set the favicon for |page_url| for |icon_type| in the thumbnail database. | 180 // Set the favicon for |page_url| for |icon_type| in the thumbnail database. |
188 // Unlike SetFavicons(), this method will not delete preexisting bitmap data | 181 // Unlike SetFavicons(), this method will not delete preexisting bitmap data |
189 // which is associated to |page_url| if at all possible. Use this method if | 182 // which is associated to |page_url| if at all possible. Use this method if |
190 // the favicon bitmaps for any of ui::GetSupportedScaleFactors() are not | 183 // the favicon bitmaps for any of ui::GetSupportedScaleFactors() are not |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 base::hash_set<MissingFaviconURLHash> missing_favicon_urls_; | 243 base::hash_set<MissingFaviconURLHash> missing_favicon_urls_; |
251 history::HistoryService* history_service_; | 244 history::HistoryService* history_service_; |
252 FaviconClient* favicon_client_; | 245 FaviconClient* favicon_client_; |
253 | 246 |
254 DISALLOW_COPY_AND_ASSIGN(FaviconService); | 247 DISALLOW_COPY_AND_ASSIGN(FaviconService); |
255 }; | 248 }; |
256 | 249 |
257 } // namespace favicon | 250 } // namespace favicon |
258 | 251 |
259 #endif // COMPONENTS_FAVICON_CORE_FAVICON_SERVICE_H_ | 252 #endif // COMPONENTS_FAVICON_CORE_FAVICON_SERVICE_H_ |
OLD | NEW |