Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 109 // the |this| scrollbar, for native scrollbars it's the native scrollbar used | 109 // the |this| scrollbar, for native scrollbars it's the native scrollbar used |
| 110 // to create this. | 110 // to create this. |
| 111 virtual void ScrollToPosition(int position); | 111 virtual void ScrollToPosition(int position); |
| 112 virtual int GetScrollIncrement(bool is_page, bool is_positive); | 112 virtual int GetScrollIncrement(bool is_page, bool is_positive); |
| 113 | 113 |
| 114 private: | 114 private: |
| 115 friend class test::ScrollViewTestApi; | 115 friend class test::ScrollViewTestApi; |
| 116 | 116 |
| 117 FRIEND_TEST_ALL_PREFIXES(ScrollBarViewsTest, ScrollBarFitsToBottom); | 117 FRIEND_TEST_ALL_PREFIXES(ScrollBarViewsTest, ScrollBarFitsToBottom); |
| 118 FRIEND_TEST_ALL_PREFIXES(ScrollBarViewsTest, ThumbFullLengthOfTrack); | 118 FRIEND_TEST_ALL_PREFIXES(ScrollBarViewsTest, ThumbFullLengthOfTrack); |
| 119 static base::Timer* GetHideTimerForTest(BaseScrollBar* scroll_bar); | |
|
tapted
2016/11/15 12:22:23
(note: This is a bit of a trade-off. I didn't give
| |
| 119 int GetThumbSizeForTest(); | 120 int GetThumbSizeForTest(); |
| 120 | 121 |
| 121 // Changes to 'pushed' state and starts a timer to scroll repeatedly. | 122 // Changes to 'pushed' state and starts a timer to scroll repeatedly. |
| 122 void ProcessPressEvent(const ui::LocatedEvent& event); | 123 void ProcessPressEvent(const ui::LocatedEvent& event); |
| 123 | 124 |
| 124 // Sets state to |state| and stops the repeater. | 125 // Sets state to |state| and stops the repeater. |
| 125 void SetState(CustomButton::ButtonState state); | 126 void SetState(CustomButton::ButtonState state); |
| 126 | 127 |
| 127 // Called when the mouse is pressed down in the track area. | 128 // Called when the mouse is pressed down in the track area. |
| 128 void TrackClicked(); | 129 void TrackClicked(); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 185 // TODO(tdresser): This should be removed when raw pixel scrolling for views | 186 // TODO(tdresser): This should be removed when raw pixel scrolling for views |
| 186 // is enabled. See crbug.com/329354. | 187 // is enabled. See crbug.com/329354. |
| 187 gfx::Vector2dF roundoff_error_; | 188 gfx::Vector2dF roundoff_error_; |
| 188 | 189 |
| 189 DISALLOW_COPY_AND_ASSIGN(BaseScrollBar); | 190 DISALLOW_COPY_AND_ASSIGN(BaseScrollBar); |
| 190 }; | 191 }; |
| 191 | 192 |
| 192 } // namespace views | 193 } // namespace views |
| 193 | 194 |
| 194 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ | 195 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ |
| OLD | NEW |