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

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

Issue 2480763005: Remove NativeScrollBar*. (Closed)
Patch Set: visibility 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // scrollbars wrap around a different scrollbar. When calling the controller 112 // scrollbars wrap around a different scrollbar. When calling the controller
113 // we need to pass in the appropriate scrollbar. For normal scrollbars it's 113 // we need to pass in the appropriate scrollbar. For normal scrollbars it's
114 // the |this| scrollbar, for native scrollbars it's the native scrollbar used 114 // the |this| scrollbar, for native scrollbars it's the native scrollbar used
115 // to create this. 115 // to create this.
116 virtual void ScrollToPosition(int position); 116 virtual void ScrollToPosition(int position);
117 virtual int GetScrollIncrement(bool is_page, bool is_positive); 117 virtual int GetScrollIncrement(bool is_page, bool is_positive);
118 118
119 private: 119 private:
120 friend class test::ScrollViewTestApi; 120 friend class test::ScrollViewTestApi;
121 121
122 FRIEND_TEST_ALL_PREFIXES(NativeScrollBarTest, ScrollBarFitsToBottom); 122 FRIEND_TEST_ALL_PREFIXES(ScrollBarViewsTest, ScrollBarFitsToBottom);
123 FRIEND_TEST_ALL_PREFIXES(NativeScrollBarTest, ThumbFullLengthOfTrack); 123 FRIEND_TEST_ALL_PREFIXES(ScrollBarViewsTest, ThumbFullLengthOfTrack);
124 int GetThumbSizeForTest(); 124 int GetThumbSizeForTest();
125 125
126 // Changes to 'pushed' state and starts a timer to scroll repeatedly. 126 // Changes to 'pushed' state and starts a timer to scroll repeatedly.
127 void ProcessPressEvent(const ui::LocatedEvent& event); 127 void ProcessPressEvent(const ui::LocatedEvent& event);
128 128
129 // Sets state to |state| and stops the repeater. 129 // Sets state to |state| and stops the repeater.
130 void SetState(CustomButton::ButtonState state); 130 void SetState(CustomButton::ButtonState state);
131 131
132 // Called when the mouse is pressed down in the track area. 132 // Called when the mouse is pressed down in the track area.
133 void TrackClicked(); 133 void TrackClicked();
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // TODO(tdresser): This should be removed when raw pixel scrolling for views 190 // TODO(tdresser): This should be removed when raw pixel scrolling for views
191 // is enabled. See crbug.com/329354. 191 // is enabled. See crbug.com/329354.
192 gfx::Vector2dF roundoff_error_; 192 gfx::Vector2dF roundoff_error_;
193 193
194 DISALLOW_COPY_AND_ASSIGN(BaseScrollBar); 194 DISALLOW_COPY_AND_ASSIGN(BaseScrollBar);
195 }; 195 };
196 196
197 } // namespace views 197 } // namespace views
198 198
199 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ 199 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698