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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 IconHostMsg_DidDownloadFavicon. Called when the icon |
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 icon at |image_url|. |
106 void OnDidDownloadFavicon(int id, | 106 void OnDidDownloadFavicon(int id, |
107 const GURL& image_url, | 107 const GURL& image_url, |
108 bool errored, | |
109 int requested_size, | 108 int requested_size, |
110 const std::vector<SkBitmap>& bitmaps); | 109 const std::vector<SkBitmap>& bitmaps); |
111 | 110 |
112 // For testing. | 111 // For testing. |
113 const std::deque<content::FaviconURL>& image_urls() const { | 112 const std::deque<content::FaviconURL>& image_urls() const { |
114 return image_urls_; | 113 return image_urls_; |
115 } | 114 } |
116 | 115 |
117 protected: | 116 protected: |
118 // These virtual methods make FaviconHandler testable and are overridden by | 117 // These virtual methods make FaviconHandler testable and are overridden by |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 // This handler's delegate. | 280 // This handler's delegate. |
282 FaviconHandlerDelegate* delegate_; // weak | 281 FaviconHandlerDelegate* delegate_; // weak |
283 | 282 |
284 // Current favicon candidate. | 283 // Current favicon candidate. |
285 FaviconCandidate favicon_candidate_; | 284 FaviconCandidate favicon_candidate_; |
286 | 285 |
287 DISALLOW_COPY_AND_ASSIGN(FaviconHandler); | 286 DISALLOW_COPY_AND_ASSIGN(FaviconHandler); |
288 }; | 287 }; |
289 | 288 |
290 #endif // CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ | 289 #endif // CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ |
OLD | NEW |