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_VIEWS_CONTROLS_LABEL_H_ | 5 #ifndef UI_VIEWS_CONTROLS_LABEL_H_ |
6 #define UI_VIEWS_CONTROLS_LABEL_H_ | 6 #define UI_VIEWS_CONTROLS_LABEL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 212 |
213 private: | 213 private: |
214 // These tests call CalculateDrawStringParams in order to verify the | 214 // These tests call CalculateDrawStringParams in order to verify the |
215 // calculations done for drawing text. | 215 // calculations done for drawing text. |
216 FRIEND_TEST_ALL_PREFIXES(LabelTest, DrawSingleLineString); | 216 FRIEND_TEST_ALL_PREFIXES(LabelTest, DrawSingleLineString); |
217 FRIEND_TEST_ALL_PREFIXES(LabelTest, DrawMultiLineString); | 217 FRIEND_TEST_ALL_PREFIXES(LabelTest, DrawMultiLineString); |
218 FRIEND_TEST_ALL_PREFIXES(LabelTest, DrawSingleLineStringInRTL); | 218 FRIEND_TEST_ALL_PREFIXES(LabelTest, DrawSingleLineStringInRTL); |
219 FRIEND_TEST_ALL_PREFIXES(LabelTest, DrawMultiLineStringInRTL); | 219 FRIEND_TEST_ALL_PREFIXES(LabelTest, DrawMultiLineStringInRTL); |
220 FRIEND_TEST_ALL_PREFIXES(LabelTest, AutoDetectDirectionality); | 220 FRIEND_TEST_ALL_PREFIXES(LabelTest, AutoDetectDirectionality); |
221 | 221 |
| 222 // Calls ComputeDrawStringFlags(). |
| 223 FRIEND_TEST_ALL_PREFIXES(LabelTest, DisableSubpixelRendering); |
| 224 |
222 static gfx::Font GetDefaultFont(); | 225 static gfx::Font GetDefaultFont(); |
223 | 226 |
224 void Init(const string16& text, const gfx::Font& font); | 227 void Init(const string16& text, const gfx::Font& font); |
225 | 228 |
226 void RecalculateColors(); | 229 void RecalculateColors(); |
227 | 230 |
228 // If the mouse is over the text, SetContainsMouse(true) is invoked, otherwise | 231 // If the mouse is over the text, SetContainsMouse(true) is invoked, otherwise |
229 // SetContainsMouse(false) is invoked. | 232 // SetContainsMouse(false) is invoked. |
230 void UpdateContainsMouse(const MouseEvent& event); | 233 void UpdateContainsMouse(const MouseEvent& event); |
231 | 234 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 // allows this view to reserve space for a focus border that it otherwise | 282 // allows this view to reserve space for a focus border that it otherwise |
280 // might not have because it is not itself focusable. | 283 // might not have because it is not itself focusable. |
281 bool has_focus_border_; | 284 bool has_focus_border_; |
282 | 285 |
283 DISALLOW_COPY_AND_ASSIGN(Label); | 286 DISALLOW_COPY_AND_ASSIGN(Label); |
284 }; | 287 }; |
285 | 288 |
286 } // namespace views | 289 } // namespace views |
287 | 290 |
288 #endif // UI_VIEWS_CONTROLS_LABEL_H_ | 291 #endif // UI_VIEWS_CONTROLS_LABEL_H_ |
OLD | NEW |