Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: ui/gfx/render_text_harfbuzz.h

Issue 779793006: MacViews: Use RenderTextHarfBuzz only for Textfields (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename to CreateInstanceOfSameType Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/gfx/render_text_harfbuzz.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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> CreateInstanceOfSameType() 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
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_
OLDNEW
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/gfx/render_text_harfbuzz.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698