| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // DidScrollUpdate expects to be called only if the scroll position change. | 71 // DidScrollUpdate expects to be called only if the scroll position change. |
| 72 // Effect both Android and Aura Overlay Scrollbar. | 72 // Effect both Android and Aura Overlay Scrollbar. |
| 73 void DidScrollUpdate(); | 73 void DidScrollUpdate(); |
| 74 | 74 |
| 75 void DidScrollBegin(); | 75 void DidScrollBegin(); |
| 76 void DidScrollEnd(); | 76 void DidScrollEnd(); |
| 77 | 77 |
| 78 void DidMouseDown(); | 78 void DidMouseDown(); |
| 79 void DidMouseUp(); | 79 void DidMouseUp(); |
| 80 void DidMouseLeave(); | 80 void DidMouseLeave(); |
| 81 void DidMouseMove(const gfx::PointF& device_viewport_point); | 81 void DidMouseMove(const gfx::PointF& device_viewport_point, |
| 82 bool is_mouse_down); |
| 82 | 83 |
| 83 // Called when Blink wants to show the scrollbars (via | 84 // Called when Blink wants to show the scrollbars (via |
| 84 // ScrollableArea::showOverlayScrollbars). | 85 // ScrollableArea::showOverlayScrollbars). |
| 85 void DidRequestShowFromMainThread(); | 86 void DidRequestShowFromMainThread(); |
| 86 | 87 |
| 87 // These methods are public for testing. | 88 // These methods are public for testing. |
| 88 bool MouseIsOverScrollbarThumb(ScrollbarOrientation orientation) const; | 89 bool MouseIsOverScrollbarThumb(ScrollbarOrientation orientation) const; |
| 89 bool MouseIsNearScrollbarThumb(ScrollbarOrientation orientation) const; | 90 bool MouseIsNearScrollbarThumb(ScrollbarOrientation orientation) const; |
| 90 bool MouseIsNearScrollbar(ScrollbarOrientation orientation) const; | 91 bool MouseIsNearScrollbar(ScrollbarOrientation orientation) const; |
| 91 bool MouseIsNearAnyScrollbar() const; | 92 bool MouseIsNearAnyScrollbar() const; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 vertical_controller_; | 159 vertical_controller_; |
| 159 std::unique_ptr<SingleScrollbarAnimationControllerThinning> | 160 std::unique_ptr<SingleScrollbarAnimationControllerThinning> |
| 160 horizontal_controller_; | 161 horizontal_controller_; |
| 161 | 162 |
| 162 base::WeakPtrFactory<ScrollbarAnimationController> weak_factory_; | 163 base::WeakPtrFactory<ScrollbarAnimationController> weak_factory_; |
| 163 }; | 164 }; |
| 164 | 165 |
| 165 } // namespace cc | 166 } // namespace cc |
| 166 | 167 |
| 167 #endif // CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_H_ | 168 #endif // CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_H_ |
| OLD | NEW |