| 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 #pragma once | 7 #pragma once | 
| 8 | 8 | 
| 9 #include <map> | 9 #include <map> | 
| 10 | 10 | 
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 108 | 108 | 
| 109   // Processes the current image_irls_ entry, requesting the image from the | 109   // Processes the current image_irls_ entry, requesting the image from the | 
| 110   // history / download service. | 110   // history / download service. | 
| 111   void ProcessCurrentUrl(); | 111   void ProcessCurrentUrl(); | 
| 112 | 112 | 
| 113   void OnDidDownloadFavicon(int id, | 113   void OnDidDownloadFavicon(int id, | 
| 114                             const GURL& image_url, | 114                             const GURL& image_url, | 
| 115                             bool errored, | 115                             bool errored, | 
| 116                             const gfx::Image& image); | 116                             const gfx::Image& image); | 
| 117 | 117 | 
|  | 118   // For testing. | 
|  | 119   const std::deque<FaviconURL>& image_urls() const { return image_urls_; } | 
|  | 120 | 
| 118  protected: | 121  protected: | 
| 119   // These virtual methods make FaviconHandler testable and are overridden by | 122   // These virtual methods make FaviconHandler testable and are overridden by | 
| 120   // TestFaviconHandler. | 123   // TestFaviconHandler. | 
| 121 | 124 | 
| 122   // Return the NavigationEntry for the active entry, or NULL if the active | 125   // Return the NavigationEntry for the active entry, or NULL if the active | 
| 123   // entries URL does not match that of the URL last passed to FetchFavicon. | 126   // entries URL does not match that of the URL last passed to FetchFavicon. | 
| 124   virtual content::NavigationEntry* GetEntry(); | 127   virtual content::NavigationEntry* GetEntry(); | 
| 125 | 128 | 
| 126   // Asks the render to download favicon, returns the request id. | 129   // Asks the render to download favicon, returns the request id. | 
| 127   virtual int DownloadFavicon(const GURL& image_url, int image_size); | 130   virtual int DownloadFavicon(const GURL& image_url, int image_size); | 
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 287   // This handler's delegate. | 290   // This handler's delegate. | 
| 288   FaviconHandlerDelegate* delegate_;  // weak | 291   FaviconHandlerDelegate* delegate_;  // weak | 
| 289 | 292 | 
| 290   // Current favicon candidate. | 293   // Current favicon candidate. | 
| 291   FaviconCandidate favicon_candidate_; | 294   FaviconCandidate favicon_candidate_; | 
| 292 | 295 | 
| 293   DISALLOW_COPY_AND_ASSIGN(FaviconHandler); | 296   DISALLOW_COPY_AND_ASSIGN(FaviconHandler); | 
| 294 }; | 297 }; | 
| 295 | 298 | 
| 296 #endif  // CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ | 299 #endif  // CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ | 
| OLD | NEW | 
|---|