| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BASE_FAVICON_TYPES_H_ | 5 #ifndef COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_ |
| 6 #define COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_ | 6 #define COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 // either the bitmap data if the favicon database has a sufficiently large | 83 // either the bitmap data if the favicon database has a sufficiently large |
| 84 // favicon bitmap and the style of the fallback icon otherwise. | 84 // favicon bitmap and the style of the fallback icon otherwise. |
| 85 struct LargeIconResult { | 85 struct LargeIconResult { |
| 86 explicit LargeIconResult(const FaviconRawBitmapResult& bitmap_in); | 86 explicit LargeIconResult(const FaviconRawBitmapResult& bitmap_in); |
| 87 | 87 |
| 88 // Takes ownership of |fallback_icon_style_in|. | 88 // Takes ownership of |fallback_icon_style_in|. |
| 89 explicit LargeIconResult(FallbackIconStyle* fallback_icon_style_in); | 89 explicit LargeIconResult(FallbackIconStyle* fallback_icon_style_in); |
| 90 | 90 |
| 91 ~LargeIconResult(); | 91 ~LargeIconResult(); |
| 92 | 92 |
| 93 // Returns true if the LargeIconResult contains no data (neither in |bitmap|, |
| 94 // nor in |fallback_icon_style|). |
| 95 bool is_empty() const; |
| 96 |
| 93 // The bitmap from the favicon database if the database has a sufficiently | 97 // The bitmap from the favicon database if the database has a sufficiently |
| 94 // large one. | 98 // large one. |
| 95 FaviconRawBitmapResult bitmap; | 99 FaviconRawBitmapResult bitmap; |
| 96 | 100 |
| 97 // The fallback icon style if a sufficiently large icon isn't available. This | 101 // The fallback icon style if a sufficiently large icon isn't available. This |
| 98 // uses the dominant color of a smaller icon as the background if available. | 102 // uses the dominant color of a smaller icon as the background if available. |
| 99 std::unique_ptr<FallbackIconStyle> fallback_icon_style; | 103 std::unique_ptr<FallbackIconStyle> fallback_icon_style; |
| 100 }; | 104 }; |
| 101 | 105 |
| 102 // Result returned by LargeIconService::GetLargeIconImageOrFallbackStyle(). | 106 // Result returned by LargeIconService::GetLargeIconImageOrFallbackStyle(). |
| (...skipping 12 matching lines...) Expand all Loading... |
| 115 gfx::Image image; | 119 gfx::Image image; |
| 116 | 120 |
| 117 // The fallback icon style if a sufficiently large icon isn't available. This | 121 // The fallback icon style if a sufficiently large icon isn't available. This |
| 118 // uses the dominant color of a smaller icon as the background if available. | 122 // uses the dominant color of a smaller icon as the background if available. |
| 119 std::unique_ptr<FallbackIconStyle> fallback_icon_style; | 123 std::unique_ptr<FallbackIconStyle> fallback_icon_style; |
| 120 }; | 124 }; |
| 121 | 125 |
| 122 } // namespace favicon_base | 126 } // namespace favicon_base |
| 123 | 127 |
| 124 #endif // COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_ | 128 #endif // COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_ |
| OLD | NEW |