| 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_RENDER_TEXT_MAC_H_ | 5 #ifndef UI_GFX_RENDER_TEXT_MAC_H_ |
| 6 #define UI_GFX_RENDER_TEXT_MAC_H_ | 6 #define UI_GFX_RENDER_TEXT_MAC_H_ |
| 7 | 7 |
| 8 #include <ApplicationServices/ApplicationServices.h> | 8 #include <ApplicationServices/ApplicationServices.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 std::vector<Rect> GetSubstringBounds(const Range& range) override; | 46 std::vector<Rect> GetSubstringBounds(const Range& range) override; |
| 47 size_t TextIndexToDisplayIndex(size_t index) override; | 47 size_t TextIndexToDisplayIndex(size_t index) override; |
| 48 size_t DisplayIndexToTextIndex(size_t index) override; | 48 size_t DisplayIndexToTextIndex(size_t index) override; |
| 49 bool IsValidCursorIndex(size_t index) override; | 49 bool IsValidCursorIndex(size_t index) override; |
| 50 void OnLayoutTextAttributeChanged(bool text_changed) override; | 50 void OnLayoutTextAttributeChanged(bool text_changed) override; |
| 51 void OnDisplayTextAttributeChanged() override; | 51 void OnDisplayTextAttributeChanged() override; |
| 52 void EnsureLayout() override; | 52 void EnsureLayout() override; |
| 53 void DrawVisualText(Canvas* canvas) override; | 53 void DrawVisualText(Canvas* canvas) override; |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Mac_ElidedText); |
| 57 |
| 56 struct TextRun { | 58 struct TextRun { |
| 57 CTRunRef ct_run; | 59 CTRunRef ct_run; |
| 58 SkPoint origin; | 60 SkPoint origin; |
| 59 std::vector<uint16> glyphs; | 61 std::vector<uint16> glyphs; |
| 60 std::vector<SkPoint> glyph_positions; | 62 std::vector<SkPoint> glyph_positions; |
| 61 SkScalar width; | 63 SkScalar width; |
| 62 std::string font_name; | 64 std::string font_name; |
| 63 int font_style; | 65 int font_style; |
| 64 SkScalar text_size; | 66 SkScalar text_size; |
| 65 SkColor foreground; | 67 SkColor foreground; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 96 | 98 |
| 97 // Indicates that |runs_| are valid, set by |ComputeRuns()|. | 99 // Indicates that |runs_| are valid, set by |ComputeRuns()|. |
| 98 bool runs_valid_; | 100 bool runs_valid_; |
| 99 | 101 |
| 100 DISALLOW_COPY_AND_ASSIGN(RenderTextMac); | 102 DISALLOW_COPY_AND_ASSIGN(RenderTextMac); |
| 101 }; | 103 }; |
| 102 | 104 |
| 103 } // namespace gfx | 105 } // namespace gfx |
| 104 | 106 |
| 105 #endif // UI_GFX_RENDER_TEXT_MAC_H_ | 107 #endif // UI_GFX_RENDER_TEXT_MAC_H_ |
| OLD | NEW |