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

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

Issue 16917011: mac: Replace base::mac::ScopedCFTypeRef with base::ScopedCFTypeRef. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with fixed off-by-1 in git-clang-format Created 7 years, 6 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
« no previous file with comments | « ui/gfx/image/image_unittest_util_ios.mm ('k') | ui/gfx/render_text_mac.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 (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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 ~TextRun(); 67 ~TextRun();
68 }; 68 };
69 69
70 // Applies RenderText styles to |attr_string| with the given |ct_font|. 70 // Applies RenderText styles to |attr_string| with the given |ct_font|.
71 void ApplyStyles(CFMutableAttributedStringRef attr_string, CTFontRef ct_font); 71 void ApplyStyles(CFMutableAttributedStringRef attr_string, CTFontRef ct_font);
72 72
73 // Updates |runs_| based on |line_| and sets |runs_valid_| to true. 73 // Updates |runs_| based on |line_| and sets |runs_valid_| to true.
74 void ComputeRuns(); 74 void ComputeRuns();
75 75
76 // The Core Text line of text. Created by |EnsureLayout()|. 76 // The Core Text line of text. Created by |EnsureLayout()|.
77 base::mac::ScopedCFTypeRef<CTLineRef> line_; 77 base::ScopedCFTypeRef<CTLineRef> line_;
78 78
79 // Array to hold CFAttributedString attributes that allows Core Text to hold 79 // Array to hold CFAttributedString attributes that allows Core Text to hold
80 // weak references to them without leaking. 80 // weak references to them without leaking.
81 base::mac::ScopedCFTypeRef<CFMutableArrayRef> attributes_; 81 base::ScopedCFTypeRef<CFMutableArrayRef> attributes_;
82 82
83 // Visual dimensions of the text. Computed by |EnsureLayout()|. 83 // Visual dimensions of the text. Computed by |EnsureLayout()|.
84 Size string_size_; 84 Size string_size_;
85 85
86 // Common baseline for this line of text. Computed by |EnsureLayout()|. 86 // Common baseline for this line of text. Computed by |EnsureLayout()|.
87 SkScalar common_baseline_; 87 SkScalar common_baseline_;
88 88
89 // Visual text runs. Only valid if |runs_valid_| is true. Computed by 89 // Visual text runs. Only valid if |runs_valid_| is true. Computed by
90 // |ComputeRuns()|. 90 // |ComputeRuns()|.
91 std::vector<TextRun> runs_; 91 std::vector<TextRun> runs_;
92 92
93 // Indicates that |runs_| are valid, set by |ComputeRuns()|. 93 // Indicates that |runs_| are valid, set by |ComputeRuns()|.
94 bool runs_valid_; 94 bool runs_valid_;
95 95
96 DISALLOW_COPY_AND_ASSIGN(RenderTextMac); 96 DISALLOW_COPY_AND_ASSIGN(RenderTextMac);
97 }; 97 };
98 98
99 } // namespace gfx 99 } // namespace gfx
100 100
101 #endif // UI_GFX_RENDER_TEXT_MAC_H_ 101 #endif // UI_GFX_RENDER_TEXT_MAC_H_
OLDNEW
« no previous file with comments | « ui/gfx/image/image_unittest_util_ios.mm ('k') | ui/gfx/render_text_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698