OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_H_ | 5 #ifndef CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_H_ |
6 #define CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_H_ | 6 #define CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_H_ |
7 | 7 |
8 #include "base/cancelable_callback.h" | 8 #include "base/cancelable_callback.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 void DidResize(); | 78 void DidResize(); |
79 | 79 |
80 void DidScrollBegin(); | 80 void DidScrollBegin(); |
81 void DidScrollEnd(); | 81 void DidScrollEnd(); |
82 | 82 |
83 void DidMouseDown(); | 83 void DidMouseDown(); |
84 void DidMouseUp(); | 84 void DidMouseUp(); |
85 void DidMouseLeave(); | 85 void DidMouseLeave(); |
86 void DidMouseMoveNear(ScrollbarOrientation, float); | 86 void DidMouseMoveNear(ScrollbarOrientation, float); |
87 | 87 |
| 88 // Called when Blink wants to show the scrollbars (via |
| 89 // ScrollableArea::showOverlayScrollbars). |
| 90 void DidRequestShowFromMainThread(); |
| 91 |
88 bool MouseIsOverScrollbar(ScrollbarOrientation orientation) const; | 92 bool MouseIsOverScrollbar(ScrollbarOrientation orientation) const; |
89 bool MouseIsNearScrollbar(ScrollbarOrientation orientation) const; | 93 bool MouseIsNearScrollbar(ScrollbarOrientation orientation) const; |
90 bool MouseIsNearAnyScrollbar() const; | 94 bool MouseIsNearAnyScrollbar() const; |
91 | 95 |
92 static constexpr float kMouseMoveDistanceToTriggerShow = 30.0f; | 96 static constexpr float kMouseMoveDistanceToTriggerShow = 30.0f; |
93 | 97 |
94 private: | 98 private: |
95 ScrollbarAnimationController(int scroll_layer_id, | 99 ScrollbarAnimationController(int scroll_layer_id, |
96 ScrollbarAnimationControllerClient* client, | 100 ScrollbarAnimationControllerClient* client, |
97 base::TimeDelta fade_out_delay, | 101 base::TimeDelta fade_out_delay, |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 vertical_controller_; | 164 vertical_controller_; |
161 std::unique_ptr<SingleScrollbarAnimationControllerThinning> | 165 std::unique_ptr<SingleScrollbarAnimationControllerThinning> |
162 horizontal_controller_; | 166 horizontal_controller_; |
163 | 167 |
164 base::WeakPtrFactory<ScrollbarAnimationController> weak_factory_; | 168 base::WeakPtrFactory<ScrollbarAnimationController> weak_factory_; |
165 }; | 169 }; |
166 | 170 |
167 } // namespace cc | 171 } // namespace cc |
168 | 172 |
169 #endif // CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_H_ | 173 #endif // CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_H_ |
OLD | NEW |