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

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

Issue 2520433003: Fix event targeting for overlay scrollbar thumbs (in native UI). (Closed)
Patch Set: remove circular construction dependency 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 14 matching lines...) Expand all
25 /////////////////////////////////////////////////////////////////////////////// 25 ///////////////////////////////////////////////////////////////////////////////
26 // 26 //
27 // BaseScrollBar 27 // BaseScrollBar
28 // 28 //
29 /////////////////////////////////////////////////////////////////////////////// 29 ///////////////////////////////////////////////////////////////////////////////
30 class VIEWS_EXPORT BaseScrollBar : public ScrollBar, 30 class VIEWS_EXPORT BaseScrollBar : public ScrollBar,
31 public ScrollDelegate, 31 public ScrollDelegate,
32 public ContextMenuController, 32 public ContextMenuController,
33 public MenuDelegate { 33 public MenuDelegate {
34 public: 34 public:
35 BaseScrollBar(bool horizontal, BaseScrollBarThumb* thumb); 35 explicit BaseScrollBar(bool horizontal);
36 ~BaseScrollBar() override; 36 ~BaseScrollBar() override;
37 37
38 void SetThumb(BaseScrollBarThumb* thumb);
39
38 // Get the bounds of the "track" area that the thumb is free to slide within. 40 // Get the bounds of the "track" area that the thumb is free to slide within.
39 virtual gfx::Rect GetTrackBounds() const = 0; 41 virtual gfx::Rect GetTrackBounds() const = 0;
40 42
41 // An enumeration of different amounts of incremental scroll, representing 43 // An enumeration of different amounts of incremental scroll, representing
42 // events sent from different parts of the UI/keyboard. 44 // events sent from different parts of the UI/keyboard.
43 enum ScrollAmount { 45 enum ScrollAmount {
44 SCROLL_NONE = 0, 46 SCROLL_NONE = 0,
45 SCROLL_START, 47 SCROLL_START,
46 SCROLL_END, 48 SCROLL_END,
47 SCROLL_PREV_LINE, 49 SCROLL_PREV_LINE,
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // TODO(tdresser): This should be removed when raw pixel scrolling for views 173 // TODO(tdresser): This should be removed when raw pixel scrolling for views
172 // is enabled. See crbug.com/329354. 174 // is enabled. See crbug.com/329354.
173 gfx::Vector2dF roundoff_error_; 175 gfx::Vector2dF roundoff_error_;
174 176
175 DISALLOW_COPY_AND_ASSIGN(BaseScrollBar); 177 DISALLOW_COPY_AND_ASSIGN(BaseScrollBar);
176 }; 178 };
177 179
178 } // namespace views 180 } // namespace views
179 181
180 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ 182 #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