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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 protected: | 123 protected: |
124 // These virtual methods make FaviconHandler testable and are overridden by | 124 // These virtual methods make FaviconHandler testable and are overridden by |
125 // TestFaviconHandler. | 125 // TestFaviconHandler. |
126 | 126 |
127 // Return the NavigationEntry for the active entry, or NULL if the active | 127 // Return the NavigationEntry for the active entry, or NULL if the active |
128 // entries URL does not match that of the URL last passed to FetchFavicon. | 128 // entries URL does not match that of the URL last passed to FetchFavicon. |
129 virtual content::NavigationEntry* GetEntry(); | 129 virtual content::NavigationEntry* GetEntry(); |
130 | 130 |
131 // Asks the render to download favicon, returns the request id. | 131 // Asks the render to download favicon, returns the request id. |
132 virtual int DownloadFavicon(const GURL& image_url, int image_size); | 132 virtual int DownloadFavicon(const GURL& image_url, const std::vector<int>& ima
ge_size); |
133 | 133 |
134 // Ask the favicon from history | 134 // Ask the favicon from history |
135 virtual void UpdateFaviconMappingAndFetch( | 135 virtual void UpdateFaviconMappingAndFetch( |
136 const GURL& page_url, | 136 const GURL& page_url, |
137 const GURL& icon_url, | 137 const GURL& icon_url, |
138 history::IconType icon_type, | 138 history::IconType icon_type, |
139 CancelableRequestConsumerBase* consumer, | 139 CancelableRequestConsumerBase* consumer, |
140 const FaviconService::FaviconDataCallback& callback); | 140 const FaviconService::FaviconDataCallback& callback); |
141 | 141 |
142 virtual void GetFavicon( | 142 virtual void GetFavicon( |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 // This handler's delegate. | 292 // This handler's delegate. |
293 FaviconHandlerDelegate* delegate_; // weak | 293 FaviconHandlerDelegate* delegate_; // weak |
294 | 294 |
295 // Current favicon candidate. | 295 // Current favicon candidate. |
296 FaviconCandidate favicon_candidate_; | 296 FaviconCandidate favicon_candidate_; |
297 | 297 |
298 DISALLOW_COPY_AND_ASSIGN(FaviconHandler); | 298 DISALLOW_COPY_AND_ASSIGN(FaviconHandler); |
299 }; | 299 }; |
300 | 300 |
301 #endif // CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ | 301 #endif // CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ |
OLD | NEW |