OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 13 matching lines...) Expand all Loading... |
24 */ | 24 */ |
25 | 25 |
26 #ifndef ScrollAnimatorMac_h | 26 #ifndef ScrollAnimatorMac_h |
27 #define ScrollAnimatorMac_h | 27 #define ScrollAnimatorMac_h |
28 | 28 |
29 #include "platform/Timer.h" | 29 #include "platform/Timer.h" |
30 #include "platform/geometry/FloatPoint.h" | 30 #include "platform/geometry/FloatPoint.h" |
31 #include "platform/geometry/FloatSize.h" | 31 #include "platform/geometry/FloatSize.h" |
32 #include "platform/geometry/IntRect.h" | 32 #include "platform/geometry/IntRect.h" |
33 #include "platform/heap/Handle.h" | 33 #include "platform/heap/Handle.h" |
| 34 #include "platform/scheduler/CancellableTaskFactory.h" |
34 #include "platform/scroll/ScrollAnimatorBase.h" | 35 #include "platform/scroll/ScrollAnimatorBase.h" |
| 36 #include "public/platform/WebTaskRunner.h" |
35 #include "wtf/RetainPtr.h" | 37 #include "wtf/RetainPtr.h" |
36 | 38 |
37 OBJC_CLASS BlinkScrollAnimationHelperDelegate; | 39 OBJC_CLASS BlinkScrollAnimationHelperDelegate; |
38 OBJC_CLASS BlinkScrollbarPainterControllerDelegate; | 40 OBJC_CLASS BlinkScrollbarPainterControllerDelegate; |
39 OBJC_CLASS BlinkScrollbarPainterDelegate; | 41 OBJC_CLASS BlinkScrollbarPainterDelegate; |
40 | 42 |
41 typedef id ScrollbarPainterController; | 43 typedef id ScrollbarPainterController; |
42 | 44 |
43 namespace blink { | 45 namespace blink { |
44 | 46 |
(...skipping 29 matching lines...) Expand all Loading... |
74 | 76 |
75 private: | 77 private: |
76 RetainPtr<id> m_scrollAnimationHelper; | 78 RetainPtr<id> m_scrollAnimationHelper; |
77 RetainPtr<BlinkScrollAnimationHelperDelegate> m_scrollAnimationHelperDelegat
e; | 79 RetainPtr<BlinkScrollAnimationHelperDelegate> m_scrollAnimationHelperDelegat
e; |
78 | 80 |
79 RetainPtr<ScrollbarPainterController> m_scrollbarPainterController; | 81 RetainPtr<ScrollbarPainterController> m_scrollbarPainterController; |
80 RetainPtr<BlinkScrollbarPainterControllerDelegate> m_scrollbarPainterControl
lerDelegate; | 82 RetainPtr<BlinkScrollbarPainterControllerDelegate> m_scrollbarPainterControl
lerDelegate; |
81 RetainPtr<BlinkScrollbarPainterDelegate> m_horizontalScrollbarPainterDelegat
e; | 83 RetainPtr<BlinkScrollbarPainterDelegate> m_horizontalScrollbarPainterDelegat
e; |
82 RetainPtr<BlinkScrollbarPainterDelegate> m_verticalScrollbarPainterDelegate; | 84 RetainPtr<BlinkScrollbarPainterDelegate> m_verticalScrollbarPainterDelegate; |
83 | 85 |
84 void initialScrollbarPaintTimerFired(Timer<ScrollAnimatorMac>*); | 86 void initialScrollbarPaintTask(); |
85 Timer<ScrollAnimatorMac> m_initialScrollbarPaintTimer; | 87 OwnPtr<CancellableTaskFactory> m_initialScrollbarPaintTaskFactory; |
86 | 88 |
87 void sendContentAreaScrolledTimerFired(Timer<ScrollAnimatorMac>*); | 89 void sendContentAreaScrolledTask(); |
88 Timer<ScrollAnimatorMac> m_sendContentAreaScrolledTimer; | 90 OwnPtr<CancellableTaskFactory> m_sendContentAreaScrolledTaskFactory; |
| 91 OwnPtr<WebTaskRunner> m_taskRunner; |
89 FloatSize m_contentAreaScrolledTimerScrollDelta; | 92 FloatSize m_contentAreaScrolledTimerScrollDelta; |
90 | 93 |
91 ScrollResultOneDimensional userScroll(ScrollbarOrientation, ScrollGranularit
y, float step, float delta) override; | 94 ScrollResultOneDimensional userScroll(ScrollbarOrientation, ScrollGranularit
y, float step, float delta) override; |
92 void scrollToOffsetWithoutAnimation(const FloatPoint&) override; | 95 void scrollToOffsetWithoutAnimation(const FloatPoint&) override; |
93 | 96 |
94 void handleWheelEventPhase(PlatformWheelEventPhase) override; | 97 void handleWheelEventPhase(PlatformWheelEventPhase) override; |
95 | 98 |
96 void cancelAnimation() override; | 99 void cancelAnimation() override; |
97 | 100 |
98 void contentAreaWillPaint() const override; | 101 void contentAreaWillPaint() const override; |
(...skipping 29 matching lines...) Expand all Loading... |
128 void immediateScrollTo(const FloatPoint&); | 131 void immediateScrollTo(const FloatPoint&); |
129 | 132 |
130 bool m_haveScrolledSincePageLoad; | 133 bool m_haveScrolledSincePageLoad; |
131 bool m_needsScrollerStyleUpdate; | 134 bool m_needsScrollerStyleUpdate; |
132 IntRect m_visibleScrollerThumbRect; | 135 IntRect m_visibleScrollerThumbRect; |
133 }; | 136 }; |
134 | 137 |
135 } // namespace blink | 138 } // namespace blink |
136 | 139 |
137 #endif // ScrollAnimatorMac_h | 140 #endif // ScrollAnimatorMac_h |
OLD | NEW |