Chromium Code Reviews| Index: chrome/browser/ui/views/harmony/harmony_typography_provider.cc |
| diff --git a/chrome/browser/ui/views/harmony/harmony_typography_provider.cc b/chrome/browser/ui/views/harmony/harmony_typography_provider.cc |
| index 21caf0cb832f7db4b16030d0338632a8d7852927..65a428f8101b214eed07633e1590dcc7b12dc6c1 100644 |
| --- a/chrome/browser/ui/views/harmony/harmony_typography_provider.cc |
| +++ b/chrome/browser/ui/views/harmony/harmony_typography_provider.cc |
| @@ -8,6 +8,10 @@ |
| #include "ui/base/resource/resource_bundle.h" |
| #include "ui/gfx/platform_font.h" |
| +#if defined(USE_ASH) |
| +#include "ash/common/ash_typography.h" |
| +#endif |
| + |
| const gfx::FontList& HarmonyTypographyProvider::GetFont(int text_context, |
| int text_style) const { |
| // "Target" font size constants from the Harmony spec. |
| @@ -34,14 +38,19 @@ const gfx::FontList& HarmonyTypographyProvider::GetFont(int text_context, |
| case CONTEXT_BODY_TEXT_LARGE: |
| size_delta = kBodyTextLargeSize - gfx::PlatformFont::kDefaultBaseFontSize; |
| break; |
| - case views::style::CONTEXT_BUTTON: |
| - font_weight = kButtonFontWeight; |
| + case views::style::CONTEXT_BUTTON_MD: |
| + font_weight = WeightNotLighterThanNormal(kButtonFontWeight); |
| break; |
| default: |
| break; |
| } |
| // Ignore |text_style| since it only affects color in the Harmony spec. |
| + |
| +#if defined(USE_ASH) |
| + ash::GetDefaultAshFont(text_context, text_style, &size_delta, &font_weight); |
|
Peter Kasting
2017/04/08 01:38:54
Nit: I liked doing this above the switch, as you d
tapted
2017/04/10 12:27:33
Done.
|
| +#endif |
| + |
| return ui::ResourceBundle::GetSharedInstance().GetFontListWithDelta( |
| size_delta, gfx::Font::NORMAL, font_weight); |
| } |