| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 UI_GFX_PLATFORM_FONT_WIN_H_ | 5 #ifndef UI_GFX_PLATFORM_FONT_WIN_H_ |
| 6 #define UI_GFX_PLATFORM_FONT_WIN_H_ | 6 #define UI_GFX_PLATFORM_FONT_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // performed other than clamping to a minimum font height if | 39 // performed other than clamping to a minimum font height if |
| 40 // |get_minimum_font_size_callback| is specified. | 40 // |get_minimum_font_size_callback| is specified. |
| 41 typedef void (*AdjustFontCallback)(LOGFONT* lf); | 41 typedef void (*AdjustFontCallback)(LOGFONT* lf); |
| 42 static AdjustFontCallback adjust_font_callback; | 42 static AdjustFontCallback adjust_font_callback; |
| 43 | 43 |
| 44 // Overridden from PlatformFont: | 44 // Overridden from PlatformFont: |
| 45 virtual Font DeriveFont(int size_delta, int style) const OVERRIDE; | 45 virtual Font DeriveFont(int size_delta, int style) const OVERRIDE; |
| 46 virtual int GetHeight() const OVERRIDE; | 46 virtual int GetHeight() const OVERRIDE; |
| 47 virtual int GetBaseline() const OVERRIDE; | 47 virtual int GetBaseline() const OVERRIDE; |
| 48 virtual int GetAverageCharacterWidth() const OVERRIDE; | 48 virtual int GetAverageCharacterWidth() const OVERRIDE; |
| 49 virtual int GetStringWidth(const string16& text) const OVERRIDE; | |
| 50 virtual int GetExpectedTextWidth(int length) const OVERRIDE; | 49 virtual int GetExpectedTextWidth(int length) const OVERRIDE; |
| 51 virtual int GetStyle() const OVERRIDE; | 50 virtual int GetStyle() const OVERRIDE; |
| 52 virtual std::string GetFontName() const OVERRIDE; | 51 virtual std::string GetFontName() const OVERRIDE; |
| 53 virtual int GetFontSize() const OVERRIDE; | 52 virtual int GetFontSize() const OVERRIDE; |
| 54 virtual NativeFont GetNativeFont() const OVERRIDE; | 53 virtual NativeFont GetNativeFont() const OVERRIDE; |
| 55 | 54 |
| 56 private: | 55 private: |
| 57 virtual ~PlatformFontWin() {} | 56 virtual ~PlatformFontWin() {} |
| 58 | 57 |
| 59 // Chrome text drawing bottoms out in the Windows GDI functions that take an | 58 // Chrome text drawing bottoms out in the Windows GDI functions that take an |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 static HFontRef* base_font_ref_; | 122 static HFontRef* base_font_ref_; |
| 124 | 123 |
| 125 // Indirect reference to the HFontRef, which references the underlying HFONT. | 124 // Indirect reference to the HFontRef, which references the underlying HFONT. |
| 126 scoped_refptr<HFontRef> font_ref_; | 125 scoped_refptr<HFontRef> font_ref_; |
| 127 }; | 126 }; |
| 128 | 127 |
| 129 } // namespace gfx | 128 } // namespace gfx |
| 130 | 129 |
| 131 #endif // UI_GFX_PLATFORM_FONT_WIN_H_ | 130 #endif // UI_GFX_PLATFORM_FONT_WIN_H_ |
| 132 | 131 |
| OLD | NEW |