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

Unified Diff: ui/views/examples/multiline_example.cc

Issue 684463003: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/examples/multiline_example.h ('k') | ui/views/examples/progress_bar_example.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/multiline_example.cc
diff --git a/ui/views/examples/multiline_example.cc b/ui/views/examples/multiline_example.cc
index d2d69cce1465a1cdafe6ccd3ef4f861f28876be4..31bd72b05c15029948923c3b2007c974ea5bbfba 100644
--- a/ui/views/examples/multiline_example.cc
+++ b/ui/views/examples/multiline_example.cc
@@ -32,10 +32,10 @@ gfx::Range ClampRange(gfx::Range range, size_t max) {
class PreferredSizeLabel : public Label {
public:
PreferredSizeLabel() : Label() {}
- virtual ~PreferredSizeLabel() {}
+ ~PreferredSizeLabel() override {}
// Label:
- virtual gfx::Size GetPreferredSize() const override {
+ gfx::Size GetPreferredSize() const override {
return gfx::Size(50, Label::GetPreferredSize().height());
}
@@ -55,12 +55,12 @@ class MultilineExample::RenderTextView : public View {
SetBorder(Border::CreateSolidBorder(2, SK_ColorGRAY));
}
- virtual void OnPaint(gfx::Canvas* canvas) override {
+ void OnPaint(gfx::Canvas* canvas) override {
View::OnPaint(canvas);
render_text_->Draw(canvas);
}
- virtual gfx::Size GetPreferredSize() const override {
+ gfx::Size GetPreferredSize() const override {
// Turn off multiline mode to get the single-line text size, which is the
// preferred size for this view.
render_text_->SetMultiline(false);
@@ -71,7 +71,7 @@ class MultilineExample::RenderTextView : public View {
return size;
}
- virtual int GetHeightForWidth(int w) const override {
+ int GetHeightForWidth(int w) const override {
// TODO(ckocagil): Why does this happen?
if (w == 0)
return View::GetHeightForWidth(w);
@@ -104,7 +104,7 @@ class MultilineExample::RenderTextView : public View {
}
private:
- virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) override {
+ void OnBoundsChanged(const gfx::Rect& previous_bounds) override {
gfx::Rect bounds = GetLocalBounds();
bounds.Inset(GetInsets());
render_text_->SetDisplayRect(bounds);
« no previous file with comments | « ui/views/examples/multiline_example.h ('k') | ui/views/examples/progress_bar_example.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698