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

Side by Side Diff: ui/message_center/views/bounded_label.cc

Issue 623293004: replace OVERRIDE and FINAL with override and final in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 2 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
OLDNEW
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/strings/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"
(...skipping 26 matching lines...) Expand all
37 virtual ~InnerBoundedLabel(); 37 virtual ~InnerBoundedLabel();
38 38
39 void SetNativeTheme(const ui::NativeTheme* theme); 39 void SetNativeTheme(const ui::NativeTheme* theme);
40 40
41 // Pass in a -1 width to use the preferred width, a -1 limit to skip limits. 41 // Pass in a -1 width to use the preferred width, a -1 limit to skip limits.
42 int GetLinesForWidthAndLimit(int width, int limit); 42 int GetLinesForWidthAndLimit(int width, int limit);
43 gfx::Size GetSizeForWidthAndLines(int width, int lines); 43 gfx::Size GetSizeForWidthAndLines(int width, int lines);
44 std::vector<base::string16> GetWrappedText(int width, int lines); 44 std::vector<base::string16> GetWrappedText(int width, int lines);
45 45
46 // Overridden from views::Label. 46 // Overridden from views::Label.
47 virtual void SetText(const base::string16& text) OVERRIDE; 47 virtual void SetText(const base::string16& text) override;
48 48
49 protected: 49 protected:
50 // Overridden from views::Label. 50 // Overridden from views::Label.
51 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; 51 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
52 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 52 virtual void OnPaint(gfx::Canvas* canvas) override;
53 53
54 private: 54 private:
55 int GetTextFlags(); 55 int GetTextFlags();
56 56
57 void ClearCaches(); 57 void ClearCaches();
58 int GetCachedLines(int width); 58 int GetCachedLines(int width);
59 void SetCachedLines(int width, int lines); 59 void SetCachedLines(int width, int lines);
60 gfx::Size GetCachedSize(const std::pair<int, int>& width_and_lines); 60 gfx::Size GetCachedSize(const std::pair<int, int>& width_and_lines);
61 void SetCachedSize(std::pair<int, int> width_and_lines, gfx::Size size); 61 void SetCachedSize(std::pair<int, int> width_and_lines, gfx::Size size);
62 62
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 343
344 void BoundedLabel::OnNativeThemeChanged(const ui::NativeTheme* theme) { 344 void BoundedLabel::OnNativeThemeChanged(const ui::NativeTheme* theme) {
345 label_->SetNativeTheme(theme); 345 label_->SetNativeTheme(theme);
346 } 346 }
347 347
348 base::string16 BoundedLabel::GetWrappedTextForTest(int width, int lines) { 348 base::string16 BoundedLabel::GetWrappedTextForTest(int width, int lines) {
349 return JoinString(label_->GetWrappedText(width, lines), '\n'); 349 return JoinString(label_->GetWrappedText(width, lines), '\n');
350 } 350 }
351 351
352 } // namespace message_center 352 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/bounded_label.h ('k') | ui/message_center/views/desktop_popup_alignment_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698