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

Side by Side Diff: ash/system/tray/tray_bar_button_with_title.cc

Issue 621133002: replace OVERRIDE and FINAL with override and final in ash/ (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 unified diff | Download patch
« no previous file with comments | « ash/system/tray/tray_bar_button_with_title.h ('k') | ash/system/tray/tray_bubble_wrapper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/system/tray/tray_bar_button_with_title.h" 5 #include "ash/system/tray/tray_bar_button_with_title.h"
6 6
7 #include "ash/system/tray/tray_constants.h" 7 #include "ash/system/tray/tray_constants.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
10 #include "ui/gfx/image/image_skia.h" 10 #include "ui/gfx/image/image_skia.h"
(...skipping 22 matching lines...) Expand all
33 public: 33 public:
34 TrayBarButton(const int bar_active_images[], const int bar_disabled_images[]) 34 TrayBarButton(const int bar_active_images[], const int bar_disabled_images[])
35 : views::View(), 35 : views::View(),
36 bar_active_images_(bar_active_images), 36 bar_active_images_(bar_active_images),
37 bar_disabled_images_(bar_disabled_images), 37 bar_disabled_images_(bar_disabled_images),
38 painter_(new views::HorizontalPainter(bar_active_images_)){ 38 painter_(new views::HorizontalPainter(bar_active_images_)){
39 } 39 }
40 virtual ~TrayBarButton() {} 40 virtual ~TrayBarButton() {}
41 41
42 // Overriden from views::View: 42 // Overriden from views::View:
43 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { 43 virtual void OnPaint(gfx::Canvas* canvas) override {
44 painter_->Paint(canvas, size()); 44 painter_->Paint(canvas, size());
45 } 45 }
46 46
47 void Update(bool control_on) { 47 void Update(bool control_on) {
48 painter_.reset(new views::HorizontalPainter( 48 painter_.reset(new views::HorizontalPainter(
49 control_on ? bar_active_images_ : bar_disabled_images_)); 49 control_on ? bar_active_images_ : bar_disabled_images_));
50 SchedulePaint(); 50 SchedulePaint();
51 } 51 }
52 52
53 private: 53 private:
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // a little bit up to look closer to the bar. 101 // a little bit up to look closer to the bar.
102 gfx::Size title_size = title_->GetPreferredSize(); 102 gfx::Size title_size = title_->GetPreferredSize();
103 title_->SetBounds(rect.x(), 103 title_->SetBounds(rect.x(),
104 bar_image_y + image_height_ - 3, 104 bar_image_y + image_height_ - 3,
105 rect.width(), 105 rect.width(),
106 title_size.height()); 106 title_size.height());
107 } 107 }
108 } 108 }
109 109
110 } // namespace ash 110 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/tray_bar_button_with_title.h ('k') | ash/system/tray/tray_bubble_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698