| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace internal | 82 } // namespace internal |
| 83 | 83 |
| 84 class GFX_EXPORT RenderTextHarfBuzz : public RenderText { | 84 class GFX_EXPORT RenderTextHarfBuzz : public RenderText { |
| 85 public: | 85 public: |
| 86 RenderTextHarfBuzz(); | 86 RenderTextHarfBuzz(); |
| 87 ~RenderTextHarfBuzz() override; | 87 ~RenderTextHarfBuzz() override; |
| 88 | 88 |
| 89 // Overridden from RenderText. | 89 // Overridden from RenderText. |
| 90 scoped_ptr<RenderText> NewInstance() const override; |
| 90 Size GetStringSize() override; | 91 Size GetStringSize() override; |
| 91 SizeF GetStringSizeF() override; | 92 SizeF GetStringSizeF() override; |
| 92 SelectionModel FindCursorPosition(const Point& point) override; | 93 SelectionModel FindCursorPosition(const Point& point) override; |
| 93 std::vector<FontSpan> GetFontSpansForTesting() override; | 94 std::vector<FontSpan> GetFontSpansForTesting() override; |
| 94 Range GetGlyphBounds(size_t index) override; | 95 Range GetGlyphBounds(size_t index) override; |
| 95 | 96 |
| 96 protected: | 97 protected: |
| 97 // Overridden from RenderText. | 98 // Overridden from RenderText. |
| 98 int GetLayoutTextBaseline() override; | 99 int GetLayoutTextBaseline() override; |
| 99 SelectionModel AdjacentCharSelectionModel( | 100 SelectionModel AdjacentCharSelectionModel( |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 // ICU grapheme iterator for the layout text. Valid when |!needs_layout_|. Can | 166 // ICU grapheme iterator for the layout text. Valid when |!needs_layout_|. Can |
| 166 // be NULL in case of an error. | 167 // be NULL in case of an error. |
| 167 scoped_ptr<base::i18n::BreakIterator> grapheme_iterator_; | 168 scoped_ptr<base::i18n::BreakIterator> grapheme_iterator_; |
| 168 | 169 |
| 169 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz); | 170 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz); |
| 170 }; | 171 }; |
| 171 | 172 |
| 172 } // namespace gfx | 173 } // namespace gfx |
| 173 | 174 |
| 174 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_ | 175 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_ |
| OLD | NEW |