Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MAC_H_ | 5 #ifndef UI_GFX_PLATFORM_FONT_MAC_H_ |
| 6 #define UI_GFX_PLATFORM_FONT_MAC_H_ | 6 #define UI_GFX_PLATFORM_FONT_MAC_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/mac/scoped_nsobject.h" | 9 #include "base/mac/scoped_nsobject.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "ui/gfx/font_render_params.h" | 11 #include "ui/gfx/font_render_params.h" |
| 12 #include "ui/gfx/platform_font.h" | 12 #include "ui/gfx/platform_font.h" |
| 13 | 13 |
| 14 namespace gfx { | 14 namespace gfx { |
| 15 | 15 |
| 16 class PlatformFontMac : public PlatformFont { | 16 class PlatformFontMac : public PlatformFont { |
| 17 public: | 17 public: |
| 18 PlatformFontMac(); | 18 PlatformFontMac(); |
| 19 explicit PlatformFontMac(NativeFont native_font); | 19 explicit PlatformFontMac(NativeFont native_font, bool underline = false); |
|
Avi (use Gerrit)
2016/08/05 14:54:59
If you have two parameters, you don't need to have
| |
| 20 PlatformFontMac(const std::string& font_name, | 20 PlatformFontMac(const std::string& font_name, |
| 21 int font_size); | 21 int font_size); |
| 22 | 22 |
| 23 // Overridden from PlatformFont: | 23 // Overridden from PlatformFont: |
| 24 Font DeriveFont(int size_delta, | 24 Font DeriveFont(int size_delta, |
| 25 int style, | 25 int style, |
| 26 Font::Weight weight) const override; | 26 Font::Weight weight) const override; |
| 27 int GetHeight() override; | 27 int GetHeight() override; |
| 28 Font::Weight GetWeight() const override; | 28 Font::Weight GetWeight() const override; |
| 29 int GetBaseline() override; | 29 int GetBaseline() override; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 | 67 |
| 68 // Details about how the font should be rendered. | 68 // Details about how the font should be rendered. |
| 69 FontRenderParams render_params_; | 69 FontRenderParams render_params_; |
| 70 | 70 |
| 71 DISALLOW_COPY_AND_ASSIGN(PlatformFontMac); | 71 DISALLOW_COPY_AND_ASSIGN(PlatformFontMac); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace gfx | 74 } // namespace gfx |
| 75 | 75 |
| 76 #endif // UI_GFX_PLATFORM_FONT_MAC_H_ | 76 #endif // UI_GFX_PLATFORM_FONT_MAC_H_ |
| OLD | NEW |