| 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_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_FAVICON_FAVICON_SERVICE_H_ |
| 6 #define CHROME_BROWSER_FAVICON_FAVICON_SERVICE_H_ | 6 #define CHROME_BROWSER_FAVICON_FAVICON_SERVICE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 namespace chrome { | 25 namespace chrome { |
| 26 struct FaviconImageResult; | 26 struct FaviconImageResult; |
| 27 } | 27 } |
| 28 | 28 |
| 29 // The favicon service provides methods to access favicons. It calls the history | 29 // The favicon service provides methods to access favicons. It calls the history |
| 30 // backend behind the scenes. | 30 // backend behind the scenes. |
| 31 // | 31 // |
| 32 // This service is thread safe. Each request callback is invoked in the | 32 // This service is thread safe. Each request callback is invoked in the |
| 33 // thread that made the request. | 33 // thread that made the request. |
| 34 class FaviconService : public CancelableRequestProvider, | 34 class FaviconService : public CancelableRequestProvider, |
| 35 public ProfileKeyedService { | 35 public BrowserContextKeyedService { |
| 36 public: | 36 public: |
| 37 explicit FaviconService(HistoryService* history_service); | 37 explicit FaviconService(HistoryService* history_service); |
| 38 | 38 |
| 39 virtual ~FaviconService(); | 39 virtual ~FaviconService(); |
| 40 | 40 |
| 41 // Auxiliary argument structure for requesting favicons for URLs. | 41 // Auxiliary argument structure for requesting favicons for URLs. |
| 42 struct FaviconForURLParams { | 42 struct FaviconForURLParams { |
| 43 FaviconForURLParams(Profile* profile, | 43 FaviconForURLParams(Profile* profile, |
| 44 const GURL& page_url, | 44 const GURL& page_url, |
| 45 int icon_types, | 45 int icon_types, |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 void RunFaviconRawCallbackWithBitmapResults( | 261 void RunFaviconRawCallbackWithBitmapResults( |
| 262 const FaviconRawCallback& callback, | 262 const FaviconRawCallback& callback, |
| 263 int desired_size_in_dip, | 263 int desired_size_in_dip, |
| 264 ui::ScaleFactor desired_scale_factor, | 264 ui::ScaleFactor desired_scale_factor, |
| 265 const std::vector<chrome::FaviconBitmapResult>& favicon_bitmap_results); | 265 const std::vector<chrome::FaviconBitmapResult>& favicon_bitmap_results); |
| 266 | 266 |
| 267 DISALLOW_COPY_AND_ASSIGN(FaviconService); | 267 DISALLOW_COPY_AND_ASSIGN(FaviconService); |
| 268 }; | 268 }; |
| 269 | 269 |
| 270 #endif // CHROME_BROWSER_FAVICON_FAVICON_SERVICE_H_ | 270 #endif // CHROME_BROWSER_FAVICON_FAVICON_SERVICE_H_ |
| OLD | NEW |