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

Side by Side Diff: ui/views/controls/scrollbar/base_scroll_bar.h

Issue 2454323002: MacViews: Reveal scrollbars when resting on the trackpad. (Closed)
Patch Set: rebase for r432358 Created 4 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 UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ 5 #ifndef UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_
6 #define UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ 6 #define UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "ui/views/animation/scroll_animator.h" 10 #include "ui/views/animation/scroll_animator.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // the |this| scrollbar, for native scrollbars it's the native scrollbar used 101 // the |this| scrollbar, for native scrollbars it's the native scrollbar used
102 // to create this. 102 // to create this.
103 virtual void ScrollToPosition(int position); 103 virtual void ScrollToPosition(int position);
104 virtual int GetScrollIncrement(bool is_page, bool is_positive); 104 virtual int GetScrollIncrement(bool is_page, bool is_positive);
105 105
106 private: 106 private:
107 friend class test::ScrollViewTestApi; 107 friend class test::ScrollViewTestApi;
108 108
109 FRIEND_TEST_ALL_PREFIXES(ScrollBarViewsTest, ScrollBarFitsToBottom); 109 FRIEND_TEST_ALL_PREFIXES(ScrollBarViewsTest, ScrollBarFitsToBottom);
110 FRIEND_TEST_ALL_PREFIXES(ScrollBarViewsTest, ThumbFullLengthOfTrack); 110 FRIEND_TEST_ALL_PREFIXES(ScrollBarViewsTest, ThumbFullLengthOfTrack);
111 static base::Timer* GetHideTimerForTest(BaseScrollBar* scroll_bar);
111 int GetThumbSizeForTest(); 112 int GetThumbSizeForTest();
112 113
113 // Changes to 'pushed' state and starts a timer to scroll repeatedly. 114 // Changes to 'pushed' state and starts a timer to scroll repeatedly.
114 void ProcessPressEvent(const ui::LocatedEvent& event); 115 void ProcessPressEvent(const ui::LocatedEvent& event);
115 116
116 // Called when the mouse is pressed down in the track area. 117 // Called when the mouse is pressed down in the track area.
117 void TrackClicked(); 118 void TrackClicked();
118 119
119 // Responsible for scrolling the contents and also updating the UI to the 120 // Responsible for scrolling the contents and also updating the UI to the
120 // current value of the Scroll Offset. 121 // current value of the Scroll Offset.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // TODO(tdresser): This should be removed when raw pixel scrolling for views 171 // TODO(tdresser): This should be removed when raw pixel scrolling for views
171 // is enabled. See crbug.com/329354. 172 // is enabled. See crbug.com/329354.
172 gfx::Vector2dF roundoff_error_; 173 gfx::Vector2dF roundoff_error_;
173 174
174 DISALLOW_COPY_AND_ASSIGN(BaseScrollBar); 175 DISALLOW_COPY_AND_ASSIGN(BaseScrollBar);
175 }; 176 };
176 177
177 } // namespace views 178 } // namespace views
178 179
179 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ 180 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_
OLDNEW
« no previous file with comments | « ui/views/controls/scroll_view_unittest.cc ('k') | ui/views/controls/scrollbar/base_scroll_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698