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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 history::IconType icon_type, | 148 history::IconType icon_type, |
149 CancelableRequestConsumerBase* consumer, | 149 CancelableRequestConsumerBase* consumer, |
150 const FaviconService::FaviconResultsCallback& callback); | 150 const FaviconService::FaviconResultsCallback& callback); |
151 | 151 |
152 virtual void GetFaviconForURL( | 152 virtual void GetFaviconForURL( |
153 const GURL& page_url, | 153 const GURL& page_url, |
154 int icon_types, | 154 int icon_types, |
155 CancelableRequestConsumerBase* consumer, | 155 CancelableRequestConsumerBase* consumer, |
156 const FaviconService::FaviconResultsCallback& callback); | 156 const FaviconService::FaviconResultsCallback& callback); |
157 | 157 |
158 virtual void SetHistoryFavicon(const GURL& page_url, | 158 virtual void SetHistoryFavicons( |
159 const GURL& icon_url, | 159 const GURL& page_url, |
160 const std::vector<unsigned char>& image_data, | 160 const GURL& icon_url, |
161 history::IconType icon_type); | 161 history::IconType icon_type, |
| 162 const gfx::Image& image); |
162 | 163 |
163 virtual FaviconService* GetFaviconService(); | 164 virtual FaviconService* GetFaviconService(); |
164 | 165 |
165 // Returns true if the favicon should be saved. | 166 // Returns true if the favicon should be saved. |
166 virtual bool ShouldSaveFavicon(const GURL& url); | 167 virtual bool ShouldSaveFavicon(const GURL& url); |
167 | 168 |
168 private: | 169 private: |
169 friend class TestFaviconHandler; // For testing | 170 friend class TestFaviconHandler; // For testing |
170 | 171 |
171 struct DownloadRequest { | 172 struct DownloadRequest { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 // This handler's delegate. | 297 // This handler's delegate. |
297 FaviconHandlerDelegate* delegate_; // weak | 298 FaviconHandlerDelegate* delegate_; // weak |
298 | 299 |
299 // Current favicon candidate. | 300 // Current favicon candidate. |
300 FaviconCandidate favicon_candidate_; | 301 FaviconCandidate favicon_candidate_; |
301 | 302 |
302 DISALLOW_COPY_AND_ASSIGN(FaviconHandler); | 303 DISALLOW_COPY_AND_ASSIGN(FaviconHandler); |
303 }; | 304 }; |
304 | 305 |
305 #endif // CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ | 306 #endif // CHROME_BROWSER_FAVICON_FAVICON_HANDLER_H_ |
OLD | NEW |