| 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 | 237 |
| 238 int ComputeDrawStringFlags() const; | 238 int ComputeDrawStringFlags() const; |
| 239 | 239 |
| 240 gfx::Rect GetAvailableRect() const; | 240 gfx::Rect GetAvailableRect() const; |
| 241 | 241 |
| 242 // Returns parameters to be used for the DrawString call. | 242 // Returns parameters to be used for the DrawString call. |
| 243 void CalculateDrawStringParams(base::string16* paint_text, | 243 void CalculateDrawStringParams(base::string16* paint_text, |
| 244 gfx::Rect* text_bounds, | 244 gfx::Rect* text_bounds, |
| 245 int* flags) const; | 245 int* flags) const; |
| 246 | 246 |
| 247 // Updates any colors that have not been explicitly set from the theme. |
| 248 void UpdateColorsFromTheme(const ui::NativeTheme* theme); |
| 249 |
| 247 // Resets |cached_heights_| and |cached_heights_cursor_| and mark | 250 // Resets |cached_heights_| and |cached_heights_cursor_| and mark |
| 248 // |text_size_valid_| as false. | 251 // |text_size_valid_| as false. |
| 249 void ResetCachedSize(); | 252 void ResetCachedSize(); |
| 250 | 253 |
| 251 bool ShouldShowDefaultTooltip() const; | 254 bool ShouldShowDefaultTooltip() const; |
| 252 | 255 |
| 253 base::string16 text_; | 256 base::string16 text_; |
| 254 base::string16 layout_text_; | 257 base::string16 layout_text_; |
| 255 gfx::FontList font_list_; | 258 gfx::FontList font_list_; |
| 256 SkColor requested_enabled_color_; | 259 SkColor requested_enabled_color_; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 // The cached heights to avoid recalculation in GetHeightForWidth(). | 299 // The cached heights to avoid recalculation in GetHeightForWidth(). |
| 297 std::vector<gfx::Size> cached_heights_; | 300 std::vector<gfx::Size> cached_heights_; |
| 298 int cached_heights_cursor_; | 301 int cached_heights_cursor_; |
| 299 | 302 |
| 300 DISALLOW_COPY_AND_ASSIGN(Label); | 303 DISALLOW_COPY_AND_ASSIGN(Label); |
| 301 }; | 304 }; |
| 302 | 305 |
| 303 } // namespace views | 306 } // namespace views |
| 304 | 307 |
| 305 #endif // UI_VIEWS_CONTROLS_LABEL_H_ | 308 #endif // UI_VIEWS_CONTROLS_LABEL_H_ |
| OLD | NEW |