| 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 "base/memory/ref_counted_memory.h" | 8 #include "base/memory/ref_counted_memory.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 // Define type with same structure as FaviconRawBitmapResult for passing data to | 74 // Define type with same structure as FaviconRawBitmapResult for passing data to |
| 75 // HistoryBackend::SetFavicons(). | 75 // HistoryBackend::SetFavicons(). |
| 76 typedef FaviconRawBitmapResult FaviconRawBitmapData; | 76 typedef FaviconRawBitmapResult FaviconRawBitmapData; |
| 77 | 77 |
| 78 // Result returned by LargeIconService::GetLargeIconOrFallbackStyle(). Contains | 78 // Result returned by LargeIconService::GetLargeIconOrFallbackStyle(). Contains |
| 79 // either the bitmap data if the favicon database has a sufficiently large | 79 // either the bitmap data if the favicon database has a sufficiently large |
| 80 // favicon bitmap and the style of the fallback icon otherwise. | 80 // favicon bitmap and the style of the fallback icon otherwise. |
| 81 struct LargeIconResult { | 81 struct LargeIconResult { |
| 82 LargeIconResult(); | 82 explicit LargeIconResult(const FaviconRawBitmapResult& bitmap_in); |
| 83 |
| 84 // Takes ownership of |fallback_icon_style_in|. |
| 85 explicit LargeIconResult(FallbackIconStyle* fallback_icon_style_in); |
| 86 |
| 83 ~LargeIconResult(); | 87 ~LargeIconResult(); |
| 84 | 88 |
| 85 // The bitmap from the favicon database if the database has a sufficiently | 89 // The bitmap from the favicon database if the database has a sufficiently |
| 86 // large one. | 90 // large one. |
| 87 FaviconRawBitmapResult bitmap; | 91 FaviconRawBitmapResult bitmap; |
| 88 | 92 |
| 89 // The fallback icon style if a sufficiently large icon isn't available. This | 93 // The fallback icon style if a sufficiently large icon isn't available. This |
| 90 // uses the dominant color of a smaller icon as the background if available. | 94 // uses the dominant color of a smaller icon as the background if available. |
| 91 scoped_ptr<FallbackIconStyle> fallback_icon_style; | 95 scoped_ptr<FallbackIconStyle> fallback_icon_style; |
| 92 }; | 96 }; |
| 93 | 97 |
| 94 } // namespace favicon_base | 98 } // namespace favicon_base |
| 95 | 99 |
| 96 #endif // COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_ | 100 #endif // COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_ |
| OLD | NEW |