| 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_FAVICON_FAVICON_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ |
| 6 #define CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ | 6 #define CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 // Message Handler. Must be public, because also called from | 94 // Message Handler. Must be public, because also called from |
| 95 // PrerenderContents. Collects the |image_urls| list. | 95 // PrerenderContents. Collects the |image_urls| list. |
| 96 void OnUpdateFaviconURL(int32 page_id, | 96 void OnUpdateFaviconURL(int32 page_id, |
| 97 const std::vector<content::FaviconURL>& candidates); | 97 const std::vector<content::FaviconURL>& candidates); |
| 98 | 98 |
| 99 // Processes the current image_irls_ entry, requesting the image from the | 99 // Processes the current image_irls_ entry, requesting the image from the |
| 100 // history / download service. | 100 // history / download service. |
| 101 void ProcessCurrentUrl(); | 101 void ProcessCurrentUrl(); |
| 102 | 102 |
| 103 // Message handler for IconHostMsg_DidDownloadFavicon. Called when the icon | 103 // Message handler for ImageHostMsg_DidDownloadImage. Called when the image |
| 104 // at |image_url| has been downloaded. | 104 // at |image_url| has been downloaded. |
| 105 // |bitmaps| is a list of all the frames of the icon at |image_url|. | 105 // |bitmaps| is a list of all the frames of the image at |image_url|. |
| 106 void OnDidDownloadFavicon(int id, | 106 void OnDidDownloadFavicon(int id, |
| 107 const GURL& image_url, | 107 const GURL& image_url, |
| 108 int requested_size, | 108 int requested_size, |
| 109 const std::vector<SkBitmap>& bitmaps); | 109 const std::vector<SkBitmap>& bitmaps); |
| 110 | 110 |
| 111 // For testing. | 111 // For testing. |
| 112 const std::deque<content::FaviconURL>& image_urls() const { | 112 const std::deque<content::FaviconURL>& image_urls() const { |
| 113 return image_urls_; | 113 return image_urls_; |
| 114 } | 114 } |
| 115 | 115 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 // This handler's delegate. | 278 // This handler's delegate. |
| 279 FaviconHandlerDelegate* delegate_; // weak | 279 FaviconHandlerDelegate* delegate_; // weak |
| 280 | 280 |
| 281 // Current favicon candidate. | 281 // Current favicon candidate. |
| 282 FaviconCandidate favicon_candidate_; | 282 FaviconCandidate favicon_candidate_; |
| 283 | 283 |
| 284 DISALLOW_COPY_AND_ASSIGN(FaviconHandler); | 284 DISALLOW_COPY_AND_ASSIGN(FaviconHandler); |
| 285 }; | 285 }; |
| 286 | 286 |
| 287 #endif // CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ | 287 #endif // CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ |
| OLD | NEW |