OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RENDER_TEXT_HARFBUZZ_H_ | 5 #ifndef UI_GFX_RENDER_TEXT_HARFBUZZ_H_ |
6 #define UI_GFX_RENDER_TEXT_HARFBUZZ_H_ | 6 #define UI_GFX_RENDER_TEXT_HARFBUZZ_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "third_party/harfbuzz-ng/src/hb.h" | 10 #include "third_party/harfbuzz-ng/src/hb.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 128 |
129 } // namespace internal | 129 } // namespace internal |
130 | 130 |
131 class GFX_EXPORT RenderTextHarfBuzz : public RenderText { | 131 class GFX_EXPORT RenderTextHarfBuzz : public RenderText { |
132 public: | 132 public: |
133 RenderTextHarfBuzz(); | 133 RenderTextHarfBuzz(); |
134 ~RenderTextHarfBuzz() override; | 134 ~RenderTextHarfBuzz() override; |
135 | 135 |
136 // RenderText: | 136 // RenderText: |
137 scoped_ptr<RenderText> CreateInstanceOfSameType() const override; | 137 scoped_ptr<RenderText> CreateInstanceOfSameType() const override; |
| 138 bool MultilineSupported() const override; |
138 const base::string16& GetDisplayText() override; | 139 const base::string16& GetDisplayText() override; |
139 Size GetStringSize() override; | 140 Size GetStringSize() override; |
140 SizeF GetStringSizeF() override; | 141 SizeF GetStringSizeF() override; |
141 SelectionModel FindCursorPosition(const Point& point) override; | 142 SelectionModel FindCursorPosition(const Point& point) override; |
142 std::vector<FontSpan> GetFontSpansForTesting() override; | 143 std::vector<FontSpan> GetFontSpansForTesting() override; |
143 Range GetGlyphBounds(size_t index) override; | 144 Range GetGlyphBounds(size_t index) override; |
144 | 145 |
145 protected: | 146 protected: |
146 // RenderText: | 147 // RenderText: |
147 int GetDisplayTextBaseline() override; | 148 int GetDisplayTextBaseline() override; |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 | 260 |
260 // Fixed width of glyphs. This should only be set in test environments. | 261 // Fixed width of glyphs. This should only be set in test environments. |
261 float glyph_width_for_test_; | 262 float glyph_width_for_test_; |
262 | 263 |
263 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz); | 264 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz); |
264 }; | 265 }; |
265 | 266 |
266 } // namespace gfx | 267 } // namespace gfx |
267 | 268 |
268 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_ | 269 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_ |
OLD | NEW |