Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Unified Diff: ui/views/style/typography_provider.h

Issue 2910153002: Remove views::Label::SetDisabledColor(). Replace with typography colors. (Closed)
Patch Set: rebase for r476345 Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/style/typography_provider.h
diff --git a/ui/views/style/typography_provider.h b/ui/views/style/typography_provider.h
index 76d6b6848aba2fcd7fe95d9e1b34b230b980b705..978df456f4468fb65d87fc126a4ea037c409290c 100644
--- a/ui/views/style/typography_provider.h
+++ b/ui/views/style/typography_provider.h
@@ -14,6 +14,10 @@ namespace gfx {
class FontList;
}
+namespace ui {
+class NativeTheme;
+}
+
namespace views {
// Provides fonts to use in toolkit-views UI.
@@ -24,9 +28,11 @@ class VIEWS_EXPORT TypographyProvider {
// Gets the FontList for the given |context| and |style|.
virtual const gfx::FontList& GetFont(int context, int style) const = 0;
- // Gets the color for the given |context| and |style|. This may consult
- // ui::NativeTheme.
- virtual SkColor GetColor(int context, int style) const = 0;
+ // Gets the color for the given |context| and |style|, optionally consulting
+ // |theme|.
+ virtual SkColor GetColor(int context,
+ int style,
+ const ui::NativeTheme& theme) const = 0;
// Gets the line spacing, or 0 if it should be provided by gfx::FontList.
virtual int GetLineHeight(int context, int style) const = 0;
@@ -54,7 +60,9 @@ class VIEWS_EXPORT DefaultTypographyProvider : public TypographyProvider {
// TypographyProvider:
const gfx::FontList& GetFont(int context, int style) const override;
- SkColor GetColor(int context, int style) const override;
+ SkColor GetColor(int context,
+ int style,
+ const ui::NativeTheme& theme) const override;
int GetLineHeight(int context, int style) const override;
// Sets the |size_delta| and |font_weight| that the the default GetFont()

Powered by Google App Engine
This is Rietveld 408576698