summaryrefslogtreecommitdiffstats
path: root/ui/views/painter.cc
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-10-27 14:18:28 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-27 21:18:47 +0000
commit1d5884e1c15b36604a9c9f9376d18cb91f345f47 (patch)
tree538a20279b255153fa6092122eb50f6e74fcbb7c /ui/views/painter.cc
parentb037316755183060a02dc5865cc11e7d9cdb5321 (diff)
downloadchromium_src-1d5884e1c15b36604a9c9f9376d18cb91f345f47.zip
chromium_src-1d5884e1c15b36604a9c9f9376d18cb91f345f47.tar.gz
chromium_src-1d5884e1c15b36604a9c9f9376d18cb91f345f47.tar.bz2
Standardize usage of virtual/override/final specifiers.
The Google C++ style guide states: Explicitly annotate overrides of virtual functions or virtual destructors with an override or (less frequently) final specifier. Older (pre-C++11) code will use the virtual keyword as an inferior alternative annotation. For clarity, use exactly one of override, final, or virtual when declaring an override. To better conform to these guidelines, the following constructs have been rewritten: - if a base class has a virtual destructor, then: virtual ~Foo(); -> ~Foo() override; - virtual void Foo() override; -> void Foo() override; - virtual void Foo() override final; -> void Foo() final; This patch was automatically generated. The clang plugin can generate fixit hints, which are suggested edits when it is 100% sure it knows how to fix a problem. The hints from the clang plugin were applied to the source tree using the tool in https://codereview.chromium.org/598073004. BUG=417463 R=sky@chromium.org Review URL: https://codereview.chromium.org/679233002 Cr-Commit-Position: refs/heads/master@{#301449}
Diffstat (limited to 'ui/views/painter.cc')
-rw-r--r--ui/views/painter.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/ui/views/painter.cc b/ui/views/painter.cc
index 37a5a30..2dcb0c4 100644
--- a/ui/views/painter.cc
+++ b/ui/views/painter.cc
@@ -27,11 +27,11 @@ namespace {
class DashedFocusPainter : public Painter {
public:
explicit DashedFocusPainter(const gfx::Insets& insets);
- virtual ~DashedFocusPainter();
+ ~DashedFocusPainter() override;
// Painter:
- virtual gfx::Size GetMinimumSize() const override;
- virtual void Paint(gfx::Canvas* canvas, const gfx::Size& size) override;
+ gfx::Size GetMinimumSize() const override;
+ void Paint(gfx::Canvas* canvas, const gfx::Size& size) override;
private:
const gfx::Insets insets_;
@@ -61,11 +61,11 @@ void DashedFocusPainter::Paint(gfx::Canvas* canvas, const gfx::Size& size) {
class SolidFocusPainter : public Painter {
public:
SolidFocusPainter(SkColor color, const gfx::Insets& insets);
- virtual ~SolidFocusPainter();
+ ~SolidFocusPainter() override;
// Painter:
- virtual gfx::Size GetMinimumSize() const override;
- virtual void Paint(gfx::Canvas* canvas, const gfx::Size& size) override;
+ gfx::Size GetMinimumSize() const override;
+ void Paint(gfx::Canvas* canvas, const gfx::Size& size) override;
private:
const SkColor color_;
@@ -101,11 +101,11 @@ class GradientPainter : public Painter {
SkColor* colors,
SkScalar* pos,
size_t count);
- virtual ~GradientPainter();
+ ~GradientPainter() override;
// Painter:
- virtual gfx::Size GetMinimumSize() const override;
- virtual void Paint(gfx::Canvas* canvas, const gfx::Size& size) override;
+ gfx::Size GetMinimumSize() const override;
+ void Paint(gfx::Canvas* canvas, const gfx::Size& size) override;
private:
// If |horizontal_| is true then the gradient is painted horizontally.
@@ -172,11 +172,11 @@ class ImagePainter : public Painter {
// Constructs an ImagePainter with the specified image and insets.
ImagePainter(const gfx::ImageSkia& image, const gfx::Insets& insets);
- virtual ~ImagePainter();
+ ~ImagePainter() override;
// Painter:
- virtual gfx::Size GetMinimumSize() const override;
- virtual void Paint(gfx::Canvas* canvas, const gfx::Size& size) override;
+ gfx::Size GetMinimumSize() const override;
+ void Paint(gfx::Canvas* canvas, const gfx::Size& size) override;
private:
scoped_ptr<gfx::NineImagePainter> nine_painter_;