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

Side by Side Diff: chrome/browser/ui/libgtk2ui/gtk2_border.cc

Issue 681823004: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/libgtk2ui/gtk2_border.h" 5 #include "chrome/browser/ui/libgtk2ui/gtk2_border.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h" 9 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h"
10 #include "chrome/browser/ui/libgtk2ui/gtk2_util.h" 10 #include "chrome/browser/ui/libgtk2ui/gtk2_util.h"
(...skipping 26 matching lines...) Expand all
37 const bool focused, 37 const bool focused,
38 const bool call_to_action, 38 const bool call_to_action,
39 const gfx::Size& size) 39 const gfx::Size& size)
40 : gtk2_ui_(gtk2_ui), 40 : gtk2_ui_(gtk2_ui),
41 state_(state), 41 state_(state),
42 focused_(focused), 42 focused_(focused),
43 call_to_action_(call_to_action), 43 call_to_action_(call_to_action),
44 size_(size) { 44 size_(size) {
45 } 45 }
46 46
47 virtual ~ButtonImageSkiaSource() { 47 ~ButtonImageSkiaSource() override {}
48 }
49 48
50 virtual gfx::ImageSkiaRep GetImageForScale(float scale) override { 49 gfx::ImageSkiaRep GetImageForScale(float scale) override {
51 int w = size_.width() * scale; 50 int w = size_.width() * scale;
52 int h = size_.height() * scale; 51 int h = size_.height() * scale;
53 return gfx::ImageSkiaRep( 52 return gfx::ImageSkiaRep(
54 gtk2_ui_->DrawGtkButtonBorder(state_, focused_, call_to_action_, w, h), 53 gtk2_ui_->DrawGtkButtonBorder(state_, focused_, call_to_action_, w, h),
55 scale); 54 scale);
56 } 55 }
57 56
58 private: 57 private:
59 const Gtk2UI* gtk2_ui_; 58 const Gtk2UI* gtk2_ui_;
60 const GtkStateType state_; 59 const GtkStateType state_;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 focused, 151 focused,
153 call_to_action, 152 call_to_action,
154 rect.size()), 153 rect.size()),
155 rect.size()); 154 rect.size());
156 } 155 }
157 canvas->DrawImageInt(*image, rect.x(), rect.y()); 156 canvas->DrawImageInt(*image, rect.x(), rect.y());
158 } 157 }
159 } 158 }
160 159
161 } // namespace libgtk2ui 160 } // namespace libgtk2ui
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_border.h ('k') | chrome/browser/ui/libgtk2ui/gtk2_status_icon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698