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

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

Issue 419753002: Prepare to enable RenderTextHarfBuzz by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: enable/disable flags Created 6 years, 4 months 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 | Annotate | Revision Log
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 class GFX_EXPORT RenderTextHarfBuzz : public RenderText { 64 class GFX_EXPORT RenderTextHarfBuzz : public RenderText {
65 public: 65 public:
66 RenderTextHarfBuzz(); 66 RenderTextHarfBuzz();
67 virtual ~RenderTextHarfBuzz(); 67 virtual ~RenderTextHarfBuzz();
68 68
69 // Overridden from RenderText. 69 // Overridden from RenderText.
70 virtual Size GetStringSize() OVERRIDE; 70 virtual Size GetStringSize() OVERRIDE;
71 virtual SelectionModel FindCursorPosition(const Point& point) OVERRIDE; 71 virtual SelectionModel FindCursorPosition(const Point& point) OVERRIDE;
72 virtual std::vector<FontSpan> GetFontSpansForTesting() OVERRIDE; 72 virtual std::vector<FontSpan> GetFontSpansForTesting() OVERRIDE;
73 virtual Range GetGlyphBounds(size_t index) OVERRIDE;
73 74
74 protected: 75 protected:
75 // Overridden from RenderText. 76 // Overridden from RenderText.
76 virtual int GetLayoutTextBaseline() OVERRIDE; 77 virtual int GetLayoutTextBaseline() OVERRIDE;
77 virtual SelectionModel AdjacentCharSelectionModel( 78 virtual SelectionModel AdjacentCharSelectionModel(
78 const SelectionModel& selection, 79 const SelectionModel& selection,
79 VisualCursorDirection direction) OVERRIDE; 80 VisualCursorDirection direction) OVERRIDE;
80 virtual SelectionModel AdjacentWordSelectionModel( 81 virtual SelectionModel AdjacentWordSelectionModel(
81 const SelectionModel& selection, 82 const SelectionModel& selection,
82 VisualCursorDirection direction) OVERRIDE; 83 VisualCursorDirection direction) OVERRIDE;
83 virtual Range GetGlyphBounds(size_t index) OVERRIDE;
84 virtual std::vector<Rect> GetSubstringBounds(const Range& range) OVERRIDE; 84 virtual std::vector<Rect> GetSubstringBounds(const Range& range) OVERRIDE;
85 virtual size_t TextIndexToLayoutIndex(size_t index) const OVERRIDE; 85 virtual size_t TextIndexToLayoutIndex(size_t index) const OVERRIDE;
86 virtual size_t LayoutIndexToTextIndex(size_t index) const OVERRIDE; 86 virtual size_t LayoutIndexToTextIndex(size_t index) const OVERRIDE;
87 virtual bool IsValidCursorIndex(size_t index) OVERRIDE; 87 virtual bool IsValidCursorIndex(size_t index) OVERRIDE;
88 virtual void ResetLayout() OVERRIDE; 88 virtual void ResetLayout() OVERRIDE;
89 virtual void EnsureLayout() OVERRIDE; 89 virtual void EnsureLayout() OVERRIDE;
90 virtual void DrawVisualText(Canvas* canvas) OVERRIDE; 90 virtual void DrawVisualText(Canvas* canvas) OVERRIDE;
91 91
92 private: 92 private:
93 friend class RenderTextTest; 93 friend class RenderTextTest;
(...skipping 29 matching lines...) Expand all
123 std::vector<int32_t> logical_to_visual_; 123 std::vector<int32_t> logical_to_visual_;
124 124
125 bool needs_layout_; 125 bool needs_layout_;
126 126
127 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz); 127 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz);
128 }; 128 };
129 129
130 } // namespace gfx 130 } // namespace gfx
131 131
132 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_ 132 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698