Chromium Code Reviews| Index: components/favicon_base/favicon_types.h |
| diff --git a/components/favicon_base/favicon_types.h b/components/favicon_base/favicon_types.h |
| index ea6475429d93d931fb9f511fbe24adaa16ccd38e..37fb96e2defcc75964eca093888116d9f3f5c75b 100644 |
| --- a/components/favicon_base/favicon_types.h |
| +++ b/components/favicon_base/favicon_types.h |
| @@ -6,6 +6,7 @@ |
| #define COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_ |
| #include "base/memory/ref_counted_memory.h" |
| +#include "ui/gfx/color_utils.h" |
| #include "ui/gfx/geometry/size.h" |
| #include "ui/gfx/image/image.h" |
| #include "url/gurl.h" |
| @@ -72,6 +73,29 @@ struct FaviconRawBitmapResult { |
| // HistoryBackend::SetFavicons(). |
| typedef FaviconRawBitmapResult FaviconRawBitmapData; |
| +// Rendering specifications of a fallback icon, which is a square image as a |
| +// solid rounded rectangle containing a single letter. The specs exclude icon |
| +// URL and size, since these are only specified when we render. |
| +struct FallbackIconSpecs { |
| + FallbackIconSpecs(); |
| + ~FallbackIconSpecs(); |
| + |
| + // Icon background fill color. |
| + SkColor background_color; |
| + |
| + // Icon text color. |
| + SkColor text_color; |
| + |
| + // Ratio in [0.0, 1.0] from text font size (pixels) to icon size. |
| + double font_size_ratio; |
| + |
| + // Ratio in [0.0, 0.5] from rounded square's corner radius to square size. |
| + // In particular, 0.0 => square and 0.5 => circle. |
| + double corner_radius_ratio; |
|
pkotwicz
2015/01/19 04:32:02
I think that a pixel corner radius is more intuiti
huangs
2015/01/20 22:20:41
"Roundness" is a good idea, updating.
|
| + |
| + // If any field change, need to update FallbackIconSpecsBuilder. |
| +}; |
| + |
| } // namespace favicon_base |
| #endif // COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_ |