Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(574)

Side by Side Diff: chrome/browser/favicon/favicon_handler.h

Issue 10870022: Change FaviconData to be able to return data for multiple bitmaps for same icon URL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 GURL url; 193 GURL url;
194 GURL image_url; 194 GURL image_url;
195 gfx::Image image; 195 gfx::Image image;
196 float score; 196 float score;
197 history::IconType icon_type; 197 history::IconType icon_type;
198 }; 198 };
199 199
200 // See description above class for details. 200 // See description above class for details.
201 void OnFaviconDataForInitialURL(FaviconService::Handle handle, 201 void OnFaviconDataForInitialURL(FaviconService::Handle handle,
202 history::FaviconData favicon); 202 history::FaviconData favicon,
203 std::vector<GURL> icon_urls_in_db);
203 204
204 // If the favicon has expired, asks the renderer to download the favicon. 205 // If the favicon has expired, asks the renderer to download the favicon.
205 // Otherwise asks history to update the mapping between page url and icon 206 // Otherwise asks history to update the mapping between page url and icon
206 // url with a callback to OnFaviconData when done. 207 // url with a callback to OnFaviconData when done.
207 void DownloadFaviconOrAskHistory(const GURL& page_url, 208 void DownloadFaviconOrAskHistory(const GURL& page_url,
208 const GURL& icon_url, 209 const GURL& icon_url,
209 history::IconType icon_type); 210 history::IconType icon_type);
210 211
211 // See description above class for details. 212 // See description above class for details.
212 void OnFaviconData(FaviconService::Handle handle, 213 void OnFaviconData(FaviconService::Handle handle,
213 history::FaviconData favicon); 214 history::FaviconData favicon,
215 std::vector<GURL> icon_urls_in_db);
214 216
215 // Schedules a download for the specified entry. This adds the request to 217 // Schedules a download for the specified entry. This adds the request to
216 // download_requests_. 218 // download_requests_.
217 int ScheduleDownload(const GURL& url, 219 int ScheduleDownload(const GURL& url,
218 const GURL& image_url, 220 const GURL& image_url,
219 int image_size, 221 int image_size,
220 history::IconType icon_type, 222 history::IconType icon_type,
221 const FaviconTabHelper::ImageDownloadCallback& callback); 223 const FaviconTabHelper::ImageDownloadCallback& callback);
222 224
223 // Updates |favicon_candidate_| and returns true if it is an exact match. 225 // Updates |favicon_candidate_| and returns true if it is an exact match.
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 // This handler's delegate. 296 // This handler's delegate.
295 FaviconHandlerDelegate* delegate_; // weak 297 FaviconHandlerDelegate* delegate_; // weak
296 298
297 // Current favicon candidate. 299 // Current favicon candidate.
298 FaviconCandidate favicon_candidate_; 300 FaviconCandidate favicon_candidate_;
299 301
300 DISALLOW_COPY_AND_ASSIGN(FaviconHandler); 302 DISALLOW_COPY_AND_ASSIGN(FaviconHandler);
301 }; 303 };
302 304
303 #endif // CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ 305 #endif // CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698