| OLD | NEW |
| 1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2017 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 COMPONENTS_FAVICON_CORE_FAVICON_SERVICE_H_ | 5 #ifndef COMPONENTS_FAVICON_CORE_FAVICON_SERVICE_H_ |
| 6 #define COMPONENTS_FAVICON_CORE_FAVICON_SERVICE_H_ | 6 #define COMPONENTS_FAVICON_CORE_FAVICON_SERVICE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 // contains image reps for all of ui::GetSupportedScaleFactors(). Use | 182 // contains image reps for all of ui::GetSupportedScaleFactors(). Use |
| 183 // MergeFavicon() if it does not. | 183 // MergeFavicon() if it does not. |
| 184 // TODO(pkotwicz): Save unresized favicon bitmaps to the database. | 184 // TODO(pkotwicz): Save unresized favicon bitmaps to the database. |
| 185 // TODO(pkotwicz): Support adding favicons for multiple icon URLs to the | 185 // TODO(pkotwicz): Support adding favicons for multiple icon URLs to the |
| 186 // thumbnail database. | 186 // thumbnail database. |
| 187 virtual void SetFavicons(const GURL& page_url, | 187 virtual void SetFavicons(const GURL& page_url, |
| 188 const GURL& icon_url, | 188 const GURL& icon_url, |
| 189 favicon_base::IconType icon_type, | 189 favicon_base::IconType icon_type, |
| 190 const gfx::Image& image) = 0; | 190 const gfx::Image& image) = 0; |
| 191 | 191 |
| 192 // Same as SetFavicons with two differences: a) the favicon will be initially |
| 193 // set as expired; b) it will be a no-op if there is an existing cached |
| 194 // favicon for *any* type for |page_url|. |
| 195 virtual void SetExpiredFaviconsIfNoneKnown(const GURL& page_url, |
| 196 const GURL& icon_url, |
| 197 favicon_base::IconType icon_type, |
| 198 const gfx::Image& image) = 0; |
| 199 |
| 192 // Avoid repeated requests to download missing favicon. | 200 // Avoid repeated requests to download missing favicon. |
| 193 virtual void UnableToDownloadFavicon(const GURL& icon_url) = 0; | 201 virtual void UnableToDownloadFavicon(const GURL& icon_url) = 0; |
| 194 virtual bool WasUnableToDownloadFavicon(const GURL& icon_url) const = 0; | 202 virtual bool WasUnableToDownloadFavicon(const GURL& icon_url) const = 0; |
| 195 virtual void ClearUnableToDownloadFavicons() = 0; | 203 virtual void ClearUnableToDownloadFavicons() = 0; |
| 196 }; | 204 }; |
| 197 | 205 |
| 198 } // namespace favicon | 206 } // namespace favicon |
| 199 | 207 |
| 200 #endif // COMPONENTS_FAVICON_CORE_FAVICON_SERVICE_H_ | 208 #endif // COMPONENTS_FAVICON_CORE_FAVICON_SERVICE_H_ |
| OLD | NEW |