| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 static int GetMaximalIconSize(favicon_base::IconType icon_type); | 212 static int GetMaximalIconSize(favicon_base::IconType icon_type); |
| 213 | 213 |
| 214 // Called when the history request for favicon data mapped to |url_| has | 214 // Called when the history request for favicon data mapped to |url_| has |
| 215 // completed and the renderer has told us the icon URLs used by |url_| | 215 // completed and the renderer has told us the icon URLs used by |url_| |
| 216 void OnGotInitialHistoryDataAndIconURLCandidates(); | 216 void OnGotInitialHistoryDataAndIconURLCandidates(); |
| 217 | 217 |
| 218 // See description above class for details. | 218 // See description above class for details. |
| 219 void OnFaviconDataForInitialURLFromFaviconService(const std::vector< | 219 void OnFaviconDataForInitialURLFromFaviconService(const std::vector< |
| 220 favicon_base::FaviconRawBitmapResult>& favicon_bitmap_results); | 220 favicon_base::FaviconRawBitmapResult>& favicon_bitmap_results); |
| 221 | 221 |
| 222 // Increments |current_candidate_index_| if a next candidate is available, |
| 223 // returns false otherwise. |
| 224 bool IncrementCurrentCandidateIndex(); |
| 225 |
| 222 // If the favicon currently mapped to |url_| has expired, downloads the | 226 // If the favicon currently mapped to |url_| has expired, downloads the |
| 223 // current candidate favicon from the renderer. Otherwise requests data for | 227 // current candidate favicon from the renderer. Otherwise requests data for |
| 224 // the current favicon from history. If data is requested from history, | 228 // the current favicon from history. If data is requested from history, |
| 225 // OnFaviconData() is called with the history data once it has been retrieved. | 229 // OnFaviconData() is called with the history data once it has been retrieved. |
| 226 void DownloadCurrentCandidateOrAskFaviconService(); | 230 void DownloadCurrentCandidateOrAskFaviconService(); |
| 227 | 231 |
| 228 // See description above class for details. | 232 // See description above class for details. |
| 229 void OnFaviconData(const std::vector<favicon_base::FaviconRawBitmapResult>& | 233 void OnFaviconData(const std::vector<favicon_base::FaviconRawBitmapResult>& |
| 230 favicon_bitmap_results); | 234 favicon_bitmap_results); |
| 231 | 235 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 FaviconCandidate best_favicon_candidate_; | 341 FaviconCandidate best_favicon_candidate_; |
| 338 | 342 |
| 339 base::WeakPtrFactory<FaviconHandler> weak_ptr_factory_; | 343 base::WeakPtrFactory<FaviconHandler> weak_ptr_factory_; |
| 340 | 344 |
| 341 DISALLOW_COPY_AND_ASSIGN(FaviconHandler); | 345 DISALLOW_COPY_AND_ASSIGN(FaviconHandler); |
| 342 }; | 346 }; |
| 343 | 347 |
| 344 } // namespace favicon | 348 } // namespace favicon |
| 345 | 349 |
| 346 #endif // COMPONENTS_FAVICON_CORE_FAVICON_HANDLER_H_ | 350 #endif // COMPONENTS_FAVICON_CORE_FAVICON_HANDLER_H_ |
| OLD | NEW |