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

Side by Side Diff: ash/frame/custom_frame_view_ash.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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CUSTOM_FRAME_VIEW_ASH_H_ 5 #ifndef ASH_FRAME_CUSTOM_FRAME_VIEW_ASH_H_
6 #define ASH_FRAME_CUSTOM_FRAME_VIEW_ASH_H_ 6 #define ASH_FRAME_CUSTOM_FRAME_VIEW_ASH_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
(...skipping 15 matching lines...) Expand all
26 // client view takes up the entire widget and the window header is an overlay. 26 // client view takes up the entire widget and the window header is an overlay.
27 // The window header overlay slides onscreen when the user hovers the mouse at 27 // The window header overlay slides onscreen when the user hovers the mouse at
28 // the top of the screen. See also views::CustomFrameView and 28 // the top of the screen. See also views::CustomFrameView and
29 // BrowserNonClientFrameViewAsh. 29 // BrowserNonClientFrameViewAsh.
30 class ASH_EXPORT CustomFrameViewAsh : public views::NonClientFrameView { 30 class ASH_EXPORT CustomFrameViewAsh : public views::NonClientFrameView {
31 public: 31 public:
32 // Internal class name. 32 // Internal class name.
33 static const char kViewClassName[]; 33 static const char kViewClassName[];
34 34
35 explicit CustomFrameViewAsh(views::Widget* frame); 35 explicit CustomFrameViewAsh(views::Widget* frame);
36 virtual ~CustomFrameViewAsh(); 36 ~CustomFrameViewAsh() override;
37 37
38 // Inits |immersive_fullscreen_controller| so that the controller reveals 38 // Inits |immersive_fullscreen_controller| so that the controller reveals
39 // and hides |header_view_| in immersive fullscreen. 39 // and hides |header_view_| in immersive fullscreen.
40 // CustomFrameViewAsh does not take ownership of 40 // CustomFrameViewAsh does not take ownership of
41 // |immersive_fullscreen_controller|. 41 // |immersive_fullscreen_controller|.
42 void InitImmersiveFullscreenControllerForView( 42 void InitImmersiveFullscreenControllerForView(
43 ImmersiveFullscreenController* immersive_fullscreen_controller); 43 ImmersiveFullscreenController* immersive_fullscreen_controller);
44 44
45 // Sets the active and inactive frame colors. Note the inactive frame color 45 // Sets the active and inactive frame colors. Note the inactive frame color
46 // will have some transparency added when the frame is drawn. 46 // will have some transparency added when the frame is drawn.
47 void SetFrameColors(SkColor active_frame_color, SkColor inactive_frame_color); 47 void SetFrameColors(SkColor active_frame_color, SkColor inactive_frame_color);
48 48
49 // views::NonClientFrameView: 49 // views::NonClientFrameView:
50 virtual gfx::Rect GetBoundsForClientView() const override; 50 gfx::Rect GetBoundsForClientView() const override;
51 virtual gfx::Rect GetWindowBoundsForClientBounds( 51 gfx::Rect GetWindowBoundsForClientBounds(
52 const gfx::Rect& client_bounds) const override; 52 const gfx::Rect& client_bounds) const override;
53 virtual int NonClientHitTest(const gfx::Point& point) override; 53 int NonClientHitTest(const gfx::Point& point) override;
54 virtual void GetWindowMask(const gfx::Size& size, 54 void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) override;
55 gfx::Path* window_mask) override; 55 void ResetWindowControls() override;
56 virtual void ResetWindowControls() override; 56 void UpdateWindowIcon() override;
57 virtual void UpdateWindowIcon() override; 57 void UpdateWindowTitle() override;
58 virtual void UpdateWindowTitle() override; 58 void SizeConstraintsChanged() override;
59 virtual void SizeConstraintsChanged() override;
60 59
61 // views::View: 60 // views::View:
62 virtual gfx::Size GetPreferredSize() const override; 61 gfx::Size GetPreferredSize() const override;
63 virtual const char* GetClassName() const override; 62 const char* GetClassName() const override;
64 virtual gfx::Size GetMinimumSize() const override; 63 gfx::Size GetMinimumSize() const override;
65 virtual gfx::Size GetMaximumSize() const override; 64 gfx::Size GetMaximumSize() const override;
66 virtual void SchedulePaintInRect(const gfx::Rect& r) override; 65 void SchedulePaintInRect(const gfx::Rect& r) override;
67 virtual void VisibilityChanged(views::View* starting_from, 66 void VisibilityChanged(views::View* starting_from, bool is_visible) override;
68 bool is_visible) override;
69 67
70 // Get the view of the header. 68 // Get the view of the header.
71 views::View* GetHeaderView(); 69 views::View* GetHeaderView();
72 70
73 const views::View* GetAvatarIconViewForTest() const; 71 const views::View* GetAvatarIconViewForTest() const;
74 72
75 private: 73 private:
76 class OverlayView; 74 class OverlayView;
77 friend class TestWidgetConstraintsDelegate; 75 friend class TestWidgetConstraintsDelegate;
78 76
79 // views::NonClientFrameView: 77 // views::NonClientFrameView:
80 virtual bool DoesIntersectRect(const views::View* target, 78 bool DoesIntersectRect(const views::View* target,
81 const gfx::Rect& rect) const override; 79 const gfx::Rect& rect) const override;
82 80
83 // Returns the container for the minimize/maximize/close buttons that is held 81 // Returns the container for the minimize/maximize/close buttons that is held
84 // by the HeaderView. Used in testing. 82 // by the HeaderView. Used in testing.
85 FrameCaptionButtonContainerView* GetFrameCaptionButtonContainerViewForTest(); 83 FrameCaptionButtonContainerView* GetFrameCaptionButtonContainerViewForTest();
86 84
87 // Height from top of window to top of client area. 85 // Height from top of window to top of client area.
88 int NonClientTopBorderHeight() const; 86 int NonClientTopBorderHeight() const;
89 87
90 // Not owned. 88 // Not owned.
91 views::Widget* frame_; 89 views::Widget* frame_;
92 90
93 // View which contains the title and window controls. 91 // View which contains the title and window controls.
94 class HeaderView; 92 class HeaderView;
95 HeaderView* header_view_; 93 HeaderView* header_view_;
96 94
97 // Updates the hittest bounds overrides based on the window state type. 95 // Updates the hittest bounds overrides based on the window state type.
98 scoped_ptr<FrameBorderHitTestController> frame_border_hit_test_controller_; 96 scoped_ptr<FrameBorderHitTestController> frame_border_hit_test_controller_;
99 97
100 DISALLOW_COPY_AND_ASSIGN(CustomFrameViewAsh); 98 DISALLOW_COPY_AND_ASSIGN(CustomFrameViewAsh);
101 }; 99 };
102 100
103 } // namespace ash 101 } // namespace ash
104 102
105 #endif // ASH_FRAME_CUSTOM_FRAME_VIEW_ASH_H_ 103 #endif // ASH_FRAME_CUSTOM_FRAME_VIEW_ASH_H_
OLDNEW
« no previous file with comments | « ash/frame/caption_buttons/frame_size_button_unittest.cc ('k') | ash/frame/custom_frame_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698