OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_VIEWS_HARMONY_CHROME_TYPOGRAPHY_H_ | |
6 #define CHROME_BROWSER_UI_VIEWS_HARMONY_CHROME_TYPOGRAPHY_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "ui/views/style/typography.h" | |
10 #include "ui/views/style/typography_provider.h" | |
11 | |
12 enum ChromeTextContext { | |
13 // Headline text. Usually 20pt. Never multi-line. | |
14 CONTEXT_HEADLINE = views::style::VIEWS_TEXT_CONTEXT_END, | |
15 | |
16 // "Body 1". Usually 13pt. | |
17 CONTEXT_BODY_TEXT_LARGE, | |
18 | |
19 // "Body 2". Usually 12pt. | |
20 CONTEXT_BODY_TEXT_SMALL, | |
21 | |
22 // ResourceBundle::SmallFont (11 pt). There is no equivalent in the Harmony | |
23 // spec, so new code should not be using this. It is only provided to avoid | |
24 // changing existing UI and it will eventually be removed. | |
25 CONTEXT_DEPRECATED_SMALL, | |
26 }; | |
27 | |
28 enum ChromeTextStyle { | |
29 // Secondary text. May be lighter than views::style::PRIMARY. | |
30 STYLE_SECONDARY = views::style::VIEWS_TEXT_STYLE_END, | |
31 | |
32 // "Hint" text, usually a line that gives context to something more important. | |
33 STYLE_HINT, | |
34 | |
35 // A solid shade of red. | |
36 STYLE_RED, | |
37 | |
38 // A solid shade of green. | |
39 STYLE_GREEN, | |
40 | |
41 // Used to draw attention to section of body text such as an extension name or | |
Peter Kasting
2017/03/17 20:59:39
Nit: section -> a section
tapted
2017/03/20 07:33:35
Done.
| |
42 // hostname. | |
43 STYLE_EMPHASIZED, | |
44 }; | |
45 | |
46 // TypographyProvider that provides pre-Harmony fonts in Chrome. | |
47 class LegacyTypographyProvider : public views::DefaultTypographyProvider { | |
48 public: | |
49 LegacyTypographyProvider() = default; | |
50 | |
51 // DefaultTypographyProvider: | |
52 const gfx::FontList& GetFont(int text_context, int text_style) const override; | |
53 | |
54 private: | |
55 DISALLOW_COPY_AND_ASSIGN(LegacyTypographyProvider); | |
56 }; | |
57 | |
58 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_CHROME_TYPOGRAPHY_H_ | |
OLD | NEW |