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

Side by Side Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view.h

Issue 686463004: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/ui/view_ids.h" 9 #include "chrome/browser/ui/view_ids.h"
10 #include "chrome/browser/ui/views/frame/browser_frame.h" 10 #include "chrome/browser/ui/views/frame/browser_frame.h"
(...skipping 20 matching lines...) Expand all
31 31
32 class OpaqueBrowserFrameView : public BrowserNonClientFrameView, 32 class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
33 public content::NotificationObserver, 33 public content::NotificationObserver,
34 public views::ButtonListener, 34 public views::ButtonListener,
35 public views::MenuButtonListener, 35 public views::MenuButtonListener,
36 public chrome::TabIconViewModel, 36 public chrome::TabIconViewModel,
37 public OpaqueBrowserFrameViewLayoutDelegate { 37 public OpaqueBrowserFrameViewLayoutDelegate {
38 public: 38 public:
39 // Constructs a non-client view for an BrowserFrame. 39 // Constructs a non-client view for an BrowserFrame.
40 OpaqueBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view); 40 OpaqueBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view);
41 virtual ~OpaqueBrowserFrameView(); 41 ~OpaqueBrowserFrameView() override;
42 42
43 // BrowserNonClientFrameView: 43 // BrowserNonClientFrameView:
44 virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const override; 44 gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const override;
45 virtual int GetTopInset() const override; 45 int GetTopInset() const override;
46 virtual int GetThemeBackgroundXInset() const override; 46 int GetThemeBackgroundXInset() const override;
47 virtual void UpdateThrobber(bool running) override; 47 void UpdateThrobber(bool running) override;
48 virtual gfx::Size GetMinimumSize() const override; 48 gfx::Size GetMinimumSize() const override;
49 49
50 // views::NonClientFrameView: 50 // views::NonClientFrameView:
51 virtual gfx::Rect GetBoundsForClientView() const override; 51 gfx::Rect GetBoundsForClientView() const override;
52 virtual gfx::Rect GetWindowBoundsForClientBounds( 52 gfx::Rect GetWindowBoundsForClientBounds(
53 const gfx::Rect& client_bounds) const override; 53 const gfx::Rect& client_bounds) const override;
54 virtual int NonClientHitTest(const gfx::Point& point) override; 54 int NonClientHitTest(const gfx::Point& point) override;
55 virtual void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) 55 void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) override;
56 override; 56 void ResetWindowControls() override;
57 virtual void ResetWindowControls() override; 57 void UpdateWindowIcon() override;
58 virtual void UpdateWindowIcon() override; 58 void UpdateWindowTitle() override;
59 virtual void UpdateWindowTitle() override; 59 void SizeConstraintsChanged() override;
60 virtual void SizeConstraintsChanged() override;
61 60
62 // views::View: 61 // views::View:
63 virtual void GetAccessibleState(ui::AXViewState* state) override; 62 void GetAccessibleState(ui::AXViewState* state) override;
64 63
65 // views::ButtonListener: 64 // views::ButtonListener:
66 virtual void ButtonPressed(views::Button* sender, const ui::Event& event) 65 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
67 override;
68 66
69 // views::MenuButtonListener: 67 // views::MenuButtonListener:
70 virtual void OnMenuButtonClicked(views::View* source, const gfx::Point& point) 68 void OnMenuButtonClicked(views::View* source,
71 override; 69 const gfx::Point& point) override;
72 70
73 // chrome::TabIconViewModel: 71 // chrome::TabIconViewModel:
74 virtual bool ShouldTabIconViewAnimate() const override; 72 bool ShouldTabIconViewAnimate() const override;
75 virtual gfx::ImageSkia GetFaviconForTabIconView() override; 73 gfx::ImageSkia GetFaviconForTabIconView() override;
76 74
77 // content::NotificationObserver implementation: 75 // content::NotificationObserver implementation:
78 virtual void Observe(int type, 76 void Observe(int type,
79 const content::NotificationSource& source, 77 const content::NotificationSource& source,
80 const content::NotificationDetails& details) override; 78 const content::NotificationDetails& details) override;
81 79
82 // OpaqueBrowserFrameViewLayoutDelegate implementation: 80 // OpaqueBrowserFrameViewLayoutDelegate implementation:
83 virtual bool ShouldShowWindowIcon() const override; 81 bool ShouldShowWindowIcon() const override;
84 virtual bool ShouldShowWindowTitle() const override; 82 bool ShouldShowWindowTitle() const override;
85 virtual base::string16 GetWindowTitle() const override; 83 base::string16 GetWindowTitle() const override;
86 virtual int GetIconSize() const override; 84 int GetIconSize() const override;
87 virtual bool ShouldLeaveOffsetNearTopBorder() const override; 85 bool ShouldLeaveOffsetNearTopBorder() const override;
88 virtual gfx::Size GetBrowserViewMinimumSize() const override; 86 gfx::Size GetBrowserViewMinimumSize() const override;
89 virtual bool ShouldShowCaptionButtons() const override; 87 bool ShouldShowCaptionButtons() const override;
90 virtual bool ShouldShowAvatar() const override; 88 bool ShouldShowAvatar() const override;
91 virtual bool IsRegularOrGuestSession() const override; 89 bool IsRegularOrGuestSession() const override;
92 virtual gfx::ImageSkia GetOTRAvatarIcon() const override; 90 gfx::ImageSkia GetOTRAvatarIcon() const override;
93 virtual bool IsMaximized() const override; 91 bool IsMaximized() const override;
94 virtual bool IsMinimized() const override; 92 bool IsMinimized() const override;
95 virtual bool IsFullscreen() const override; 93 bool IsFullscreen() const override;
96 virtual bool IsTabStripVisible() const override; 94 bool IsTabStripVisible() const override;
97 virtual int GetTabStripHeight() const override; 95 int GetTabStripHeight() const override;
98 virtual gfx::Size GetTabstripPreferredSize() const override; 96 gfx::Size GetTabstripPreferredSize() const override;
99 97
100 protected: 98 protected:
101 views::ImageButton* minimize_button() const { return minimize_button_; } 99 views::ImageButton* minimize_button() const { return minimize_button_; }
102 views::ImageButton* maximize_button() const { return maximize_button_; } 100 views::ImageButton* maximize_button() const { return maximize_button_; }
103 views::ImageButton* restore_button() const { return restore_button_; } 101 views::ImageButton* restore_button() const { return restore_button_; }
104 views::ImageButton* close_button() const { return close_button_; } 102 views::ImageButton* close_button() const { return close_button_; }
105 103
106 // views::View: 104 // views::View:
107 virtual void OnPaint(gfx::Canvas* canvas) override; 105 void OnPaint(gfx::Canvas* canvas) override;
108 106
109 private: 107 private:
110 // views::NonClientFrameView: 108 // views::NonClientFrameView:
111 virtual bool DoesIntersectRect(const views::View* target, 109 bool DoesIntersectRect(const views::View* target,
112 const gfx::Rect& rect) const override; 110 const gfx::Rect& rect) const override;
113 111
114 // Creates, adds and returns a new image button with |this| as its listener. 112 // Creates, adds and returns a new image button with |this| as its listener.
115 // Memory is owned by the caller. 113 // Memory is owned by the caller.
116 views::ImageButton* InitWindowCaptionButton(int normal_image_id, 114 views::ImageButton* InitWindowCaptionButton(int normal_image_id,
117 int hot_image_id, 115 int hot_image_id,
118 int pushed_image_id, 116 int pushed_image_id,
119 int mask_image_id, 117 int mask_image_id,
120 int accessibility_string_id, 118 int accessibility_string_id,
121 ViewID view_id); 119 ViewID view_id);
122 120
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // Background painter for the window frame. 176 // Background painter for the window frame.
179 scoped_ptr<views::FrameBackground> frame_background_; 177 scoped_ptr<views::FrameBackground> frame_background_;
180 178
181 // Observer that handles platform dependent configuration. 179 // Observer that handles platform dependent configuration.
182 scoped_ptr<OpaqueBrowserFrameViewPlatformSpecific> platform_observer_; 180 scoped_ptr<OpaqueBrowserFrameViewPlatformSpecific> platform_observer_;
183 181
184 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView); 182 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView);
185 }; 183 };
186 184
187 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ 185 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698