Add abhijeet.k@samsung.com to AUTHORS list.
[chromium-blink-merge.git] / components / favicon_base / fallback_icon_style.h
blob097636b0ccb522aacb2af8aaa0612dfe70afe53d
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_FAVICON_BASE_FALLBACK_ICON_STYLE_H_
6 #define COMPONENTS_FAVICON_BASE_FALLBACK_ICON_STYLE_H_
8 #include "third_party/skia/include/core/SkColor.h"
10 namespace favicon_base {
12 // Styling specifications of a fallback icon. The icon is composed of a solid
13 // rounded square containing a single letter. The specification excludes the
14 // icon URL and size, which are given when the icon is rendered.
15 struct FallbackIconStyle {
16 FallbackIconStyle();
17 ~FallbackIconStyle();
19 // If any member changes, also update FallbackIconStyleBuilder.
21 // Icon background fill color.
22 SkColor background_color;
24 // Icon text color.
25 SkColor text_color;
27 // Ratio in [0.0, 1.0] of the text font size (pixels) to the icon size.
28 double font_size_ratio;
30 // The roundness of the icon's corners. 0 => square icon, 1 => circle icon.
31 double roundness;
34 // Reassigns |style|'s |text_color| to matches well against |background_color|.
35 void MatchFallbackIconTextColorAgainstBackgroundColor(FallbackIconStyle* style);
37 // Returns whether |style| values are within bounds.
38 bool ValidateFallbackIconStyle(const FallbackIconStyle& style);
40 } // namespace favicon_base
42 #endif // COMPONENTS_FAVICON_BASE_FALLBACK_ICON_STYLE_H_