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

Side by Side Diff: ui/views/controls/scroll_view.h

Issue 623293004: replace OVERRIDE and FINAL with override and final in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master 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 | « ui/views/controls/resize_area.h ('k') | ui/views/controls/scroll_view.cc » ('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 (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 UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ 5 #ifndef UI_VIEWS_CONTROLS_SCROLL_VIEW_H_
6 #define UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ 6 #define UI_VIEWS_CONTROLS_SCROLL_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // Returns the horizontal/vertical scrollbar. This may return NULL. 68 // Returns the horizontal/vertical scrollbar. This may return NULL.
69 const ScrollBar* horizontal_scroll_bar() const { return horiz_sb_; } 69 const ScrollBar* horizontal_scroll_bar() const { return horiz_sb_; }
70 const ScrollBar* vertical_scroll_bar() const { return vert_sb_; } 70 const ScrollBar* vertical_scroll_bar() const { return vert_sb_; }
71 71
72 // Customize the scrollbar design. ScrollView takes the ownership of the 72 // Customize the scrollbar design. ScrollView takes the ownership of the
73 // specified ScrollBar. |horiz_sb| and |vert_sb| cannot be NULL. 73 // specified ScrollBar. |horiz_sb| and |vert_sb| cannot be NULL.
74 void SetHorizontalScrollBar(ScrollBar* horiz_sb); 74 void SetHorizontalScrollBar(ScrollBar* horiz_sb);
75 void SetVerticalScrollBar(ScrollBar* vert_sb); 75 void SetVerticalScrollBar(ScrollBar* vert_sb);
76 76
77 // View overrides: 77 // View overrides:
78 virtual gfx::Size GetPreferredSize() const OVERRIDE; 78 virtual gfx::Size GetPreferredSize() const override;
79 virtual int GetHeightForWidth(int width) const OVERRIDE; 79 virtual int GetHeightForWidth(int width) const override;
80 virtual void Layout() OVERRIDE; 80 virtual void Layout() override;
81 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; 81 virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
82 virtual bool OnMouseWheel(const ui::MouseWheelEvent& e) OVERRIDE; 82 virtual bool OnMouseWheel(const ui::MouseWheelEvent& e) override;
83 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; 83 virtual void OnMouseEntered(const ui::MouseEvent& event) override;
84 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; 84 virtual void OnMouseExited(const ui::MouseEvent& event) override;
85 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; 85 virtual void OnGestureEvent(ui::GestureEvent* event) override;
86 virtual const char* GetClassName() const OVERRIDE; 86 virtual const char* GetClassName() const override;
87 87
88 // ScrollBarController overrides: 88 // ScrollBarController overrides:
89 virtual void ScrollToPosition(ScrollBar* source, int position) OVERRIDE; 89 virtual void ScrollToPosition(ScrollBar* source, int position) override;
90 virtual int GetScrollIncrement(ScrollBar* source, 90 virtual int GetScrollIncrement(ScrollBar* source,
91 bool is_page, 91 bool is_page,
92 bool is_positive) OVERRIDE; 92 bool is_positive) override;
93 93
94 private: 94 private:
95 FRIEND_TEST_ALL_PREFIXES(ScrollViewTest, CornerViewVisibility); 95 FRIEND_TEST_ALL_PREFIXES(ScrollViewTest, CornerViewVisibility);
96 class Viewport; 96 class Viewport;
97 97
98 // Used internally by SetHeader() and SetContents() to reset the view. Sets 98 // Used internally by SetHeader() and SetContents() to reset the view. Sets
99 // |member| to |new_view|. If |new_view| is non-null it is added to |parent|. 99 // |member| to |new_view|. If |new_view| is non-null it is added to |parent|.
100 void SetHeaderOrContents(View* parent, View* new_view, View** member); 100 void SetHeaderOrContents(View* parent, View* new_view, View** member);
101 101
102 // Scrolls the minimum amount necessary to make the specified rectangle 102 // Scrolls the minimum amount necessary to make the specified rectangle
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // GetPageScrollIncrement and GetLineScrollIncrement to it. 204 // GetPageScrollIncrement and GetLineScrollIncrement to it.
205 class FixedRowHeightScrollHelper : public VariableRowHeightScrollHelper { 205 class FixedRowHeightScrollHelper : public VariableRowHeightScrollHelper {
206 public: 206 public:
207 // Creates a FixedRowHeightScrollHelper. top_margin gives the distance from 207 // Creates a FixedRowHeightScrollHelper. top_margin gives the distance from
208 // the top of the view to the first row, and may be 0. row_height gives the 208 // the top of the view to the first row, and may be 0. row_height gives the
209 // height of each row. 209 // height of each row.
210 FixedRowHeightScrollHelper(int top_margin, int row_height); 210 FixedRowHeightScrollHelper(int top_margin, int row_height);
211 211
212 protected: 212 protected:
213 // Calculates the bounds of the row from the top margin and row height. 213 // Calculates the bounds of the row from the top margin and row height.
214 virtual RowInfo GetRowInfo(int y) OVERRIDE; 214 virtual RowInfo GetRowInfo(int y) override;
215 215
216 private: 216 private:
217 int top_margin_; 217 int top_margin_;
218 int row_height_; 218 int row_height_;
219 219
220 DISALLOW_COPY_AND_ASSIGN(FixedRowHeightScrollHelper); 220 DISALLOW_COPY_AND_ASSIGN(FixedRowHeightScrollHelper);
221 }; 221 };
222 222
223 } // namespace views 223 } // namespace views
224 224
225 #endif // UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ 225 #endif // UI_VIEWS_CONTROLS_SCROLL_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/controls/resize_area.h ('k') | ui/views/controls/scroll_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698