OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "ui/message_center/views/bounded_label.h" | 5 #include "ui/message_center/views/bounded_label.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "ui/base/text/text_elider.h" | 11 #include "ui/base/text/text_elider.h" |
12 #include "ui/gfx/canvas.h" | 12 #include "ui/gfx/canvas.h" |
13 #include "ui/views/controls/label.h" | 13 #include "ui/views/controls/label.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 const size_t kPreferredLinesCacheSize = 10; | 17 const size_t kPreferredLinesCacheSize = 10; |
18 const size_t kPreferredSizeCacheSize = 10; | 18 const size_t kPreferredSizeCacheSize = 10; |
19 | 19 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 | 338 |
339 void BoundedLabel::OnNativeThemeChanged(const ui::NativeTheme* theme) { | 339 void BoundedLabel::OnNativeThemeChanged(const ui::NativeTheme* theme) { |
340 label_->SetNativeTheme(theme); | 340 label_->SetNativeTheme(theme); |
341 } | 341 } |
342 | 342 |
343 string16 BoundedLabel::GetWrappedTextForTest(int width, int lines) { | 343 string16 BoundedLabel::GetWrappedTextForTest(int width, int lines) { |
344 return JoinString(label_->GetWrappedText(width, lines), '\n'); | 344 return JoinString(label_->GetWrappedText(width, lines), '\n'); |
345 } | 345 } |
346 | 346 |
347 } // namespace message_center | 347 } // namespace message_center |
OLD | NEW |