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

Unified Diff: chrome/browser/ui/views/harmony/harmony_typography_provider.h

Issue 2765883004: Implement Harmony typography spec. (Closed)
Patch Set: respond to comments 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
Index: chrome/browser/ui/views/harmony/harmony_typography_provider.h
diff --git a/chrome/browser/ui/views/harmony/harmony_typography_provider.h b/chrome/browser/ui/views/harmony/harmony_typography_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..7885f2ceed8e30140ce11ee38abdd4cb693f4caa
--- /dev/null
+++ b/chrome/browser/ui/views/harmony/harmony_typography_provider.h
@@ -0,0 +1,25 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_TYPOGRAPHY_PROVIDER_H_
+#define CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_TYPOGRAPHY_PROVIDER_H_
+
+#include "base/macros.h"
+#include "ui/views/style/typography_provider.h"
+
+// TypographyProvider implementing the Harmony spec.
+class HarmonyTypographyProvider : public views::TypographyProvider {
+ public:
+ HarmonyTypographyProvider() = default;
+
+ // TypographyProvider:
+ const gfx::FontList& GetFont(int text_context, int text_style) const override;
+ SkColor GetColor(int context, int style) const override;
+ int GetLineHeight(int context, int style) const override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(HarmonyTypographyProvider);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_TYPOGRAPHY_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698