| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 void SetFavicon(const GURL& url, | 235 void SetFavicon(const GURL& url, |
| 236 const GURL& icon_url, | 236 const GURL& icon_url, |
| 237 const gfx::Image& image, | 237 const gfx::Image& image, |
| 238 history::IconType icon_type); | 238 history::IconType icon_type); |
| 239 | 239 |
| 240 // Converts the FAVICON's image data to an SkBitmap and sets it on the | 240 // Converts the FAVICON's image data to an SkBitmap and sets it on the |
| 241 // NavigationEntry. | 241 // NavigationEntry. |
| 242 // If the WebContents has a delegate, it is notified of the new favicon | 242 // If the WebContents has a delegate, it is notified of the new favicon |
| 243 // (INVALIDATE_FAVICON). | 243 // (INVALIDATE_FAVICON). |
| 244 void UpdateFavicon(content::NavigationEntry* entry, | 244 void UpdateFavicon(content::NavigationEntry* entry, |
| 245 scoped_refptr<base::RefCountedMemory> data); | 245 const std::vector<history::FaviconBitmapResult>& favicon_bitmap_results); |
| 246 void UpdateFavicon(content::NavigationEntry* entry, const gfx::Image* image); | 246 void UpdateFavicon(content::NavigationEntry* entry, const gfx::Image* image); |
| 247 | 247 |
| 248 // If the image is not already at its preferred size, scales the image such | 248 // If the image is not already at its preferred size, scales the image such |
| 249 // that either the width and/or height == gfx::kFaviconSize. Does nothing if | 249 // that either the width and/or height == gfx::kFaviconSize. Does nothing if |
| 250 // the image is empty. | 250 // the image is empty. |
| 251 gfx::Image ResizeFaviconIfNeeded(const gfx::Image& image); | 251 gfx::Image ResizeFaviconIfNeeded(const gfx::Image& image); |
| 252 | 252 |
| 253 void FetchFaviconInternal(); | 253 void FetchFaviconInternal(); |
| 254 | 254 |
| 255 // Return the current candidate if any. | 255 // Return the current candidate if any. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 // This handler's delegate. | 298 // This handler's delegate. |
| 299 FaviconHandlerDelegate* delegate_; // weak | 299 FaviconHandlerDelegate* delegate_; // weak |
| 300 | 300 |
| 301 // Current favicon candidate. | 301 // Current favicon candidate. |
| 302 FaviconCandidate favicon_candidate_; | 302 FaviconCandidate favicon_candidate_; |
| 303 | 303 |
| 304 DISALLOW_COPY_AND_ASSIGN(FaviconHandler); | 304 DISALLOW_COPY_AND_ASSIGN(FaviconHandler); |
| 305 }; | 305 }; |
| 306 | 306 |
| 307 #endif // CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ | 307 #endif // CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ |
| OLD | NEW |