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

Unified Diff: ui/views/style/typography.cc

Issue 2758323002: Broke out layout metric information from ViewsDelegate to LayoutProvider (Closed)
Patch Set: Final feedback addressed Created 3 years, 8 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
« no previous file with comments | « ui/views/mus/aura_init.cc ('k') | ui/views/test/scoped_views_test_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/style/typography.cc
diff --git a/ui/views/style/typography.cc b/ui/views/style/typography.cc
index 404c76e1761aeeb053be35ba6ee0674a63575342..034d56da29063b6bfd1a8b9ebfe50864d814b493 100644
--- a/ui/views/style/typography.cc
+++ b/ui/views/style/typography.cc
@@ -5,8 +5,8 @@
#include "ui/views/style/typography.h"
#include "base/logging.h"
+#include "ui/views/layout/layout_provider.h"
#include "ui/views/style/typography_provider.h"
-#include "ui/views/views_delegate.h"
namespace views {
namespace style {
@@ -22,19 +22,19 @@ void ValidateContextAndStyle(int text_context, int text_style) {
const gfx::FontList& GetFont(int text_context, int text_style) {
ValidateContextAndStyle(text_context, text_style);
- return ViewsDelegate::GetInstance()->GetTypographyProvider().GetFont(
- text_context, text_style);
+ return LayoutProvider::Get()->GetTypographyProvider().GetFont(text_context,
+ text_style);
}
SkColor GetColor(int text_context, int text_style) {
ValidateContextAndStyle(text_context, text_style);
- return ViewsDelegate::GetInstance()->GetTypographyProvider().GetColor(
- text_context, text_style);
+ return LayoutProvider::Get()->GetTypographyProvider().GetColor(text_context,
+ text_style);
}
int GetLineHeight(int text_context, int text_style) {
ValidateContextAndStyle(text_context, text_style);
- return ViewsDelegate::GetInstance()->GetTypographyProvider().GetLineHeight(
+ return LayoutProvider::Get()->GetTypographyProvider().GetLineHeight(
text_context, text_style);
}
« no previous file with comments | « ui/views/mus/aura_init.cc ('k') | ui/views/test/scoped_views_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698