| 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_HANDLER_H_ | 5 #ifndef COMPONENTS_FAVICON_CORE_FAVICON_HANDLER_H_ |
| 6 #define COMPONENTS_FAVICON_CORE_FAVICON_HANDLER_H_ | 6 #define COMPONENTS_FAVICON_CORE_FAVICON_HANDLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 186 |
| 187 GURL url; | 187 GURL url; |
| 188 GURL image_url; | 188 GURL image_url; |
| 189 gfx::Image image; | 189 gfx::Image image; |
| 190 float score; | 190 float score; |
| 191 favicon_base::IconType icon_type; | 191 favicon_base::IconType icon_type; |
| 192 }; | 192 }; |
| 193 | 193 |
| 194 // Get the maximal icon size in pixels for a icon of type |icon_type| for the | 194 // Get the maximal icon size in pixels for a icon of type |icon_type| for the |
| 195 // current platform. | 195 // current platform. |
| 196 static int GetMaximalIconSize(favicon_base::IconType icon_type); | 196 int GetMaximalIconSize(favicon_base::IconType icon_type); |
| 197 | 197 |
| 198 // See description above class for details. | 198 // See description above class for details. |
| 199 void OnFaviconDataForInitialURLFromFaviconService(const std::vector< | 199 void OnFaviconDataForInitialURLFromFaviconService(const std::vector< |
| 200 favicon_base::FaviconRawBitmapResult>& favicon_bitmap_results); | 200 favicon_base::FaviconRawBitmapResult>& favicon_bitmap_results); |
| 201 | 201 |
| 202 // If the favicon has expired, asks the renderer to download the favicon. | 202 // If the favicon has expired, asks the renderer to download the favicon. |
| 203 // Otherwise asks history to update the mapping between page url and icon | 203 // Otherwise asks history to update the mapping between page url and icon |
| 204 // url with a callback to OnFaviconData when done. | 204 // url with a callback to OnFaviconData when done. |
| 205 void DownloadFaviconOrAskFaviconService(const GURL& page_url, | 205 void DownloadFaviconOrAskFaviconService(const GURL& page_url, |
| 206 const GURL& icon_url, | 206 const GURL& icon_url, |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 // available the favicon service and the current page are updated (assuming | 304 // available the favicon service and the current page are updated (assuming |
| 305 // the image is for a favicon). | 305 // the image is for a favicon). |
| 306 FaviconCandidate best_favicon_candidate_; | 306 FaviconCandidate best_favicon_candidate_; |
| 307 | 307 |
| 308 DISALLOW_COPY_AND_ASSIGN(FaviconHandler); | 308 DISALLOW_COPY_AND_ASSIGN(FaviconHandler); |
| 309 }; | 309 }; |
| 310 | 310 |
| 311 } // namespace favicon | 311 } // namespace favicon |
| 312 | 312 |
| 313 #endif // COMPONENTS_FAVICON_CORE_FAVICON_HANDLER_H_ | 313 #endif // COMPONENTS_FAVICON_CORE_FAVICON_HANDLER_H_ |
| OLD | NEW |