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

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

Issue 2197503002: Route Scroll events through a cc::InputHandler Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-ScrollWheelAsScrollEvent
Patch Set: Abandon DeliverInputForBeginFrame: will not help fix the header row Created 4 years 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_SCROLL_BAR_H_ 5 #ifndef UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_
6 #define UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_ 6 #define UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "ui/views/view.h" 10 #include "ui/views/view.h"
(...skipping 25 matching lines...) Expand all
36 // requested. The page scroll amount typically corresponds to the 36 // requested. The page scroll amount typically corresponds to the
37 // visual size of the view. If is_page is false, the 'line scroll' amount 37 // visual size of the view. If is_page is false, the 'line scroll' amount
38 // is being requested. The line scroll amount typically corresponds to the 38 // is being requested. The line scroll amount typically corresponds to the
39 // size of one row/column. 39 // size of one row/column.
40 // 40 //
41 // The return value should always be positive. A value <= 0 results in 41 // The return value should always be positive. A value <= 0 results in
42 // scrolling by a fixed amount. 42 // scrolling by a fixed amount.
43 virtual int GetScrollIncrement(ScrollBar* source, 43 virtual int GetScrollIncrement(ScrollBar* source,
44 bool is_page, 44 bool is_page,
45 bool is_positive) = 0; 45 bool is_positive) = 0;
46
47 // Invoked by the scroll bar when it receives a ui::ScrollEvent. Typically
48 // these should be treated the same as events received over the viewport.
49 virtual void OnScrollEventFromScrollBar(ui::ScrollEvent* event) = 0;
46 }; 50 };
47 51
48 ///////////////////////////////////////////////////////////////////////////// 52 /////////////////////////////////////////////////////////////////////////////
49 // 53 //
50 // ScrollBar 54 // ScrollBar
51 // 55 //
52 // A View subclass to wrap to implement a ScrollBar. Our current windows 56 // A View subclass to wrap to implement a ScrollBar. Our current windows
53 // version simply wraps a native windows scrollbar. 57 // version simply wraps a native windows scrollbar.
54 // 58 //
55 // A scrollbar is either horizontal or vertical 59 // A scrollbar is either horizontal or vertical
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 ScrollBarController* controller_; 111 ScrollBarController* controller_;
108 112
109 int max_pos_; 113 int max_pos_;
110 114
111 DISALLOW_COPY_AND_ASSIGN(ScrollBar); 115 DISALLOW_COPY_AND_ASSIGN(ScrollBar);
112 }; 116 };
113 117
114 } // namespace views 118 } // namespace views
115 119
116 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_ 120 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_
OLDNEW
« no previous file with comments | « ui/views/controls/scrollbar/base_scroll_bar.cc ('k') | ui/views/controls/scrollbar/scrollbar_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698