| 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 "components/favicon_base/fallback_icon_style.h" |
| 10 #include "third_party/skia/include/core/SkColor.h" |
| 9 #include "ui/gfx/geometry/size.h" | 11 #include "ui/gfx/geometry/size.h" |
| 10 #include "ui/gfx/image/image.h" | 12 #include "ui/gfx/image/image.h" |
| 11 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 12 | 14 |
| 13 namespace favicon_base { | 15 namespace favicon_base { |
| 14 | 16 |
| 15 typedef int64 FaviconID; | 17 typedef int64 FaviconID; |
| 16 | 18 |
| 17 // Defines the icon types. They are also stored in icon_type field of favicons | 19 // Defines the icon types. They are also stored in icon_type field of favicons |
| 18 // table. | 20 // table. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 GURL icon_url; | 67 GURL icon_url; |
| 66 | 68 |
| 67 // The icon type of the containing favicon. | 69 // The icon type of the containing favicon. |
| 68 IconType icon_type; | 70 IconType icon_type; |
| 69 }; | 71 }; |
| 70 | 72 |
| 71 // Define type with same structure as FaviconRawBitmapResult for passing data to | 73 // Define type with same structure as FaviconRawBitmapResult for passing data to |
| 72 // HistoryBackend::SetFavicons(). | 74 // HistoryBackend::SetFavicons(). |
| 73 typedef FaviconRawBitmapResult FaviconRawBitmapData; | 75 typedef FaviconRawBitmapResult FaviconRawBitmapData; |
| 74 | 76 |
| 77 // Result returned when accessing a large icon, which is either a bitmap if |
| 78 // one was available; or the style of the fallback icon otherwise. |
| 79 struct LargeIconResult { |
| 80 LargeIconResult(); |
| 81 ~LargeIconResult(); |
| 82 |
| 83 // The bitmap of the large icon if available. |
| 84 FaviconRawBitmapResult bitmap; |
| 85 |
| 86 // The fallback icon style if a large icon isn't available. This uses the |
| 87 // dominant color of a smaller icon as the background if available. |
| 88 FallbackIconStyle fallback_icon_style; |
| 89 }; |
| 90 |
| 75 } // namespace favicon_base | 91 } // namespace favicon_base |
| 76 | 92 |
| 77 #endif // COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_ | 93 #endif // COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_ |
| OLD | NEW |