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

Unified Diff: chrome/browser/ui/views/harmony/layout_delegate.cc

Issue 2734113006: "Bootstrap" a toolkit-views Typography spec. (Closed)
Patch Set: Rebase Created 3 years, 9 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: chrome/browser/ui/views/harmony/layout_delegate.cc
diff --git a/chrome/browser/ui/views/harmony/layout_delegate.cc b/chrome/browser/ui/views/harmony/layout_delegate.cc
index 79d88b025d46793b2f222bb49774826f079f2359..d4894b3c3095dbd821a59685dfd4a26cbf26d7da 100644
--- a/chrome/browser/ui/views/harmony/layout_delegate.cc
+++ b/chrome/browser/ui/views/harmony/layout_delegate.cc
@@ -7,6 +7,7 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "chrome/browser/ui/views/chrome_views_delegate.h"
+#include "chrome/browser/ui/views/harmony/chrome_typography.h"
#include "chrome/browser/ui/views/harmony/harmony_layout_delegate.h"
#include "ui/base/material_design/material_design_controller.h"
#include "ui/views/layout/layout_constants.h"
@@ -84,3 +85,10 @@ bool LayoutDelegate::IsHarmonyMode() const {
int LayoutDelegate::GetDialogPreferredWidth(DialogWidth width) const {
return 0;
}
+
+const views::TypographyProvider& LayoutDelegate::GetTypographyProvider() const {
+ // HarmonyLayoutDelegate inherits from |this| and shouldn't inherit a
+ // LegacyTypographyProvider.
Peter Kasting 2017/03/17 02:26:00 I'm confused by this comment. HarmonyLayoutDelega
tapted 2017/03/17 10:33:10 Sorry - yes, this was pretty unclear (static here
Peter Kasting 2017/03/17 20:59:39 Ah. That's fine if you want. I think the comment
+ CR_DEFINE_STATIC_LOCAL(LegacyTypographyProvider, legacy_provider, ());
+ return legacy_provider;
+}

Powered by Google App Engine
This is Rietveld 408576698