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

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

Issue 2454323002: MacViews: Reveal scrollbars when resting on the trackpad. (Closed)
Patch Set: fix compile 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_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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // is the height for a horizontal scrollbar. 86 // is the height for a horizontal scrollbar.
87 virtual int GetLayoutSize() const = 0; 87 virtual int GetLayoutSize() const = 0;
88 88
89 // Get the width or height for this scrollbar which overlaps with the content. 89 // Get the width or height for this scrollbar which overlaps with the content.
90 // Default is 0. 90 // Default is 0.
91 virtual int GetContentOverlapSize() const; 91 virtual int GetContentOverlapSize() const;
92 92
93 virtual void OnMouseEnteredScrollView(const ui::MouseEvent& event); 93 virtual void OnMouseEnteredScrollView(const ui::MouseEvent& event);
94 virtual void OnMouseExitedScrollView(const ui::MouseEvent& event); 94 virtual void OnMouseExitedScrollView(const ui::MouseEvent& event);
95 95
96 // Called when a ScrollEvent (in any, or no, direction) is seen by the parent
97 // ScrollView. E.g., this may reveal an overlay scroll bar to indicate
spqchan 2016/11/14 23:27:58 "scroll bar" -> "scrollbar"
tapted 2016/11/15 12:22:23 Done.
98 // possible scrolling directions to the user.
99 virtual void ObserveScrollEvent(const ui::ScrollEvent& event);
100
96 protected: 101 protected:
97 // Create new scrollbar, either horizontal or vertical. These are protected 102 // Create new scrollbar, either horizontal or vertical. These are protected
98 // since you need to be creating either a NativeScrollBar or a 103 // since you need to be creating either a NativeScrollBar or a
99 // ImageScrollBar. 104 // ImageScrollBar.
100 explicit ScrollBar(bool is_horiz); 105 explicit ScrollBar(bool is_horiz);
101 106
102 private: 107 private:
103 const bool is_horiz_; 108 const bool is_horiz_;
104 109
105 ScrollBarController* controller_; 110 ScrollBarController* controller_;
106 111
107 int max_pos_; 112 int max_pos_;
108 113
109 DISALLOW_COPY_AND_ASSIGN(ScrollBar); 114 DISALLOW_COPY_AND_ASSIGN(ScrollBar);
110 }; 115 };
111 116
112 } // namespace views 117 } // namespace views
113 118
114 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_ 119 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698