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

Unified Diff: ui/gfx/image/image.cc

Issue 667923002: Standardize usage of virtual/override/final in ui/ (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/gfx/image/canvas_image_source.h ('k') | ui/gfx/image/image_skia_operations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image.cc
diff --git a/ui/gfx/image/image.cc b/ui/gfx/image/image.cc
index bd8cb2026932125729f42becdcc702c0d673bc70..3046f36de28ca135c6d57fcb71617add6202e210 100644
--- a/ui/gfx/image/image.cc
+++ b/ui/gfx/image/image.cc
@@ -66,9 +66,9 @@ ImageSkia* GetErrorImageSkia() {
class PNGImageSource : public ImageSkiaSource {
public:
PNGImageSource() {}
- virtual ~PNGImageSource() {}
+ ~PNGImageSource() override {}
- virtual ImageSkiaRep GetImageForScale(float scale) override {
+ ImageSkiaRep GetImageForScale(float scale) override {
if (image_skia_reps_.empty())
return ImageSkiaRep();
@@ -221,18 +221,13 @@ class ImageRepPNG : public ImageRep {
image_png_reps_(image_png_reps) {
}
- virtual ~ImageRepPNG() {
- }
+ ~ImageRepPNG() override {}
- virtual int Width() const override {
- return Size().width();
- }
+ int Width() const override { return Size().width(); }
- virtual int Height() const override {
- return Size().height();
- }
+ int Height() const override { return Size().height(); }
- virtual gfx::Size Size() const override {
+ gfx::Size Size() const override {
// Read the PNG data to get the image size, caching it.
if (!size_cache_) {
for (std::vector<ImagePNGRep>::const_iterator it = image_reps().begin();
@@ -267,20 +262,13 @@ class ImageRepSkia : public ImageRep {
image_(image) {
}
- virtual ~ImageRepSkia() {
- }
+ ~ImageRepSkia() override {}
- virtual int Width() const override {
- return image_->width();
- }
+ int Width() const override { return image_->width(); }
- virtual int Height() const override {
- return image_->height();
- }
+ int Height() const override { return image_->height(); }
- virtual gfx::Size Size() const override {
- return image_->size();
- }
+ gfx::Size Size() const override { return image_->size(); }
ImageSkia* image() { return image_.get(); }
@@ -332,22 +320,16 @@ class ImageRepCocoa : public ImageRep {
CHECK(image);
}
- virtual ~ImageRepCocoa() {
+ ~ImageRepCocoa() override {
base::mac::NSObjectRelease(image_);
image_ = nil;
}
- virtual int Width() const override {
- return Size().width();
- }
+ int Width() const override { return Size().width(); }
- virtual int Height() const override {
- return Size().height();
- }
+ int Height() const override { return Size().height(); }
- virtual gfx::Size Size() const override {
- return internal::NSImageSize(image_);
- }
+ gfx::Size Size() const override { return internal::NSImageSize(image_); }
NSImage* image() const { return image_; }
« no previous file with comments | « ui/gfx/image/canvas_image_source.h ('k') | ui/gfx/image/image_skia_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698