Chromium Code Reviews| Index: ui/views/style/typography.cc |
| diff --git a/ui/views/style/typography.cc b/ui/views/style/typography.cc |
| index 034d56da29063b6bfd1a8b9ebfe50864d814b493..9be18583c3527bca07ed04dc502a8e9a4b11c69f 100644 |
| --- a/ui/views/style/typography.cc |
| +++ b/ui/views/style/typography.cc |
| @@ -5,6 +5,7 @@ |
| #include "ui/views/style/typography.h" |
| #include "base/logging.h" |
| +#include "ui/native_theme/native_theme.h" |
| #include "ui/views/layout/layout_provider.h" |
| #include "ui/views/style/typography_provider.h" |
| @@ -26,10 +27,13 @@ const gfx::FontList& GetFont(int text_context, int text_style) { |
| text_style); |
| } |
| -SkColor GetColor(int text_context, int text_style) { |
| +SkColor GetColor(int text_context, |
| + int text_style, |
| + const ui::NativeTheme* native_theme) { |
| ValidateContextAndStyle(text_context, text_style); |
| - return LayoutProvider::Get()->GetTypographyProvider().GetColor(text_context, |
| - text_style); |
| + DCHECK(native_theme); |
|
Peter Kasting
2017/06/01 04:55:58
Why not just pass in by const ref then, as typogra
tapted
2017/06/01 11:22:18
Then all the callsites need an extra character in
Peter Kasting
2017/06/01 19:08:01
Hmm. That sounds like a "maybe it would be useful
tapted
2017/06/02 01:29:15
I feel a '*' at callsites is more cognitive load f
|
| + return LayoutProvider::Get()->GetTypographyProvider().GetColor( |
| + text_context, text_style, *native_theme); |
| } |
| int GetLineHeight(int text_context, int text_style) { |