OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_COMMON_GFX_CHROME_FONT_H_ | 5 #ifndef CHROME_COMMON_GFX_CHROME_FONT_H_ |
6 #define CHROME_COMMON_GFX_CHROME_FONT_H_ | 6 #define CHROME_COMMON_GFX_CHROME_FONT_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #if defined(OS_WIN) | 12 #if defined(OS_WIN) |
13 typedef struct HFONT__* HFONT; | 13 typedef struct HFONT__* HFONT; |
| 14 #else |
| 15 // TODO(port): Make it more real. |
| 16 typedef void* HFONT; |
14 #endif | 17 #endif |
15 | 18 |
16 #include "base/basictypes.h" | 19 #include "base/basictypes.h" |
17 #include "base/ref_counted.h" | 20 #include "base/ref_counted.h" |
18 | 21 |
19 // ChromeFont provides a wrapper around an underlying font. Copy and assignment | 22 // ChromeFont provides a wrapper around an underlying font. Copy and assignment |
20 // operators are explicitly allowed, and cheap. | 23 // operators are explicitly allowed, and cheap. |
21 class ChromeFont { | 24 class ChromeFont { |
22 public: | 25 public: |
23 // The following constants indicate the font style. | 26 // The following constants indicate the font style. |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 | 152 |
150 // Reference to the base font all fonts are derived from. | 153 // Reference to the base font all fonts are derived from. |
151 static HFontRef* base_font_ref_; | 154 static HFontRef* base_font_ref_; |
152 | 155 |
153 // Indirect reference to the HFontRef, which references the underlying HFONT. | 156 // Indirect reference to the HFontRef, which references the underlying HFONT. |
154 scoped_refptr<HFontRef> font_ref_; | 157 scoped_refptr<HFontRef> font_ref_; |
155 }; | 158 }; |
156 | 159 |
157 #endif // CHROME_COMMON_GFX_CHROME_FONT_H_ | 160 #endif // CHROME_COMMON_GFX_CHROME_FONT_H_ |
158 | 161 |
OLD | NEW |