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

Side by Side Diff: ash/frame/default_header_painter.h

Issue 683593003: 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
« no previous file with comments | « ash/frame/custom_frame_view_ash_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef ASH_FRAME_DEFAULT_HEADER_PAINTER_H_ 5 #ifndef ASH_FRAME_DEFAULT_HEADER_PAINTER_H_
6 #define ASH_FRAME_DEFAULT_HEADER_PAINTER_H_ 6 #define ASH_FRAME_DEFAULT_HEADER_PAINTER_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/frame/header_painter.h" 9 #include "ash/frame/header_painter.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 namespace ash { 27 namespace ash {
28 class FrameCaptionButtonContainerView; 28 class FrameCaptionButtonContainerView;
29 29
30 // Helper class for painting the default window header. 30 // Helper class for painting the default window header.
31 class ASH_EXPORT DefaultHeaderPainter : public HeaderPainter, 31 class ASH_EXPORT DefaultHeaderPainter : public HeaderPainter,
32 public gfx::AnimationDelegate { 32 public gfx::AnimationDelegate {
33 public: 33 public:
34 DefaultHeaderPainter(); 34 DefaultHeaderPainter();
35 virtual ~DefaultHeaderPainter(); 35 ~DefaultHeaderPainter() override;
36 36
37 // DefaultHeaderPainter does not take ownership of any of the parameters. 37 // DefaultHeaderPainter does not take ownership of any of the parameters.
38 void Init(views::Widget* frame, 38 void Init(views::Widget* frame,
39 views::View* header_view, 39 views::View* header_view,
40 FrameCaptionButtonContainerView* caption_button_container); 40 FrameCaptionButtonContainerView* caption_button_container);
41 41
42 // HeaderPainter overrides: 42 // HeaderPainter overrides:
43 virtual int GetMinimumHeaderWidth() const override; 43 int GetMinimumHeaderWidth() const override;
44 virtual void PaintHeader(gfx::Canvas* canvas, Mode mode) override; 44 void PaintHeader(gfx::Canvas* canvas, Mode mode) override;
45 virtual void LayoutHeader() override; 45 void LayoutHeader() override;
46 virtual int GetHeaderHeightForPainting() const override; 46 int GetHeaderHeightForPainting() const override;
47 virtual void SetHeaderHeightForPainting(int height) override; 47 void SetHeaderHeightForPainting(int height) override;
48 virtual void SchedulePaintForTitle() override; 48 void SchedulePaintForTitle() override;
49 virtual void UpdateLeftViewXInset(int left_view_x_inset) override; 49 void UpdateLeftViewXInset(int left_view_x_inset) override;
50 50
51 // Sets the left header view for the header. Passing NULL removes the view. 51 // Sets the left header view for the header. Passing NULL removes the view.
52 void UpdateLeftHeaderView(views::View* left_header_view); 52 void UpdateLeftHeaderView(views::View* left_header_view);
53 53
54 // Sets the active and inactive frame colors. Note the inactive frame color 54 // Sets the active and inactive frame colors. Note the inactive frame color
55 // will have some transparency added when the frame is drawn. 55 // will have some transparency added when the frame is drawn.
56 void SetFrameColors(SkColor active_frame_color, SkColor inactive_frame_color); 56 void SetFrameColors(SkColor active_frame_color, SkColor inactive_frame_color);
57 57
58 private: 58 private:
59 FRIEND_TEST_ALL_PREFIXES(DefaultHeaderPainterTest, TitleIconAlignment); 59 FRIEND_TEST_ALL_PREFIXES(DefaultHeaderPainterTest, TitleIconAlignment);
60 60
61 // gfx::AnimationDelegate override: 61 // gfx::AnimationDelegate override:
62 virtual void AnimationProgressed(const gfx::Animation* animation) override; 62 void AnimationProgressed(const gfx::Animation* animation) override;
63 63
64 // Paints highlight around the edge of the header for inactive restored 64 // Paints highlight around the edge of the header for inactive restored
65 // windows. 65 // windows.
66 void PaintHighlightForInactiveRestoredWindow(gfx::Canvas* canvas); 66 void PaintHighlightForInactiveRestoredWindow(gfx::Canvas* canvas);
67 67
68 // Paints the title bar, primarily the title string. 68 // Paints the title bar, primarily the title string.
69 void PaintTitleBar(gfx::Canvas* canvas); 69 void PaintTitleBar(gfx::Canvas* canvas);
70 70
71 // Paints the header/content separator. 71 // Paints the header/content separator.
72 void PaintHeaderContentSeparator(gfx::Canvas* canvas); 72 void PaintHeaderContentSeparator(gfx::Canvas* canvas);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 bool initial_paint_; 106 bool initial_paint_;
107 107
108 scoped_ptr<gfx::SlideAnimation> activation_animation_; 108 scoped_ptr<gfx::SlideAnimation> activation_animation_;
109 109
110 DISALLOW_COPY_AND_ASSIGN(DefaultHeaderPainter); 110 DISALLOW_COPY_AND_ASSIGN(DefaultHeaderPainter);
111 }; 111 };
112 112
113 } // namespace ash 113 } // namespace ash
114 114
115 #endif // ASH_FRAME_DEFAULT_HEADER_PAINTER_H_ 115 #endif // ASH_FRAME_DEFAULT_HEADER_PAINTER_H_
OLDNEW
« no previous file with comments | « ash/frame/custom_frame_view_ash_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698