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 17 matching lines...) Expand all Loading... |
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/scheduler/CancellableTaskFactory.h" |
35 #include "platform/scroll/ScrollAnimatorBase.h" | 35 #include "platform/scroll/ScrollAnimatorBase.h" |
36 #include "public/platform/WebTaskRunner.h" | 36 #include "public/platform/WebTaskRunner.h" |
37 #include "wtf/RetainPtr.h" | 37 #include "wtf/RetainPtr.h" |
38 #include <memory> | |
39 | 38 |
40 OBJC_CLASS BlinkScrollAnimationHelperDelegate; | 39 OBJC_CLASS BlinkScrollAnimationHelperDelegate; |
41 OBJC_CLASS BlinkScrollbarPainterControllerDelegate; | 40 OBJC_CLASS BlinkScrollbarPainterControllerDelegate; |
42 OBJC_CLASS BlinkScrollbarPainterDelegate; | 41 OBJC_CLASS BlinkScrollbarPainterDelegate; |
43 | 42 |
44 typedef id ScrollbarPainterController; | 43 typedef id ScrollbarPainterController; |
45 | 44 |
46 namespace blink { | 45 namespace blink { |
47 | 46 |
48 class Scrollbar; | 47 class Scrollbar; |
(...skipping 27 matching lines...) Expand all Loading... |
76 private: | 75 private: |
77 RetainPtr<id> m_scrollAnimationHelper; | 76 RetainPtr<id> m_scrollAnimationHelper; |
78 RetainPtr<BlinkScrollAnimationHelperDelegate> m_scrollAnimationHelperDelegat
e; | 77 RetainPtr<BlinkScrollAnimationHelperDelegate> m_scrollAnimationHelperDelegat
e; |
79 | 78 |
80 RetainPtr<ScrollbarPainterController> m_scrollbarPainterController; | 79 RetainPtr<ScrollbarPainterController> m_scrollbarPainterController; |
81 RetainPtr<BlinkScrollbarPainterControllerDelegate> m_scrollbarPainterControl
lerDelegate; | 80 RetainPtr<BlinkScrollbarPainterControllerDelegate> m_scrollbarPainterControl
lerDelegate; |
82 RetainPtr<BlinkScrollbarPainterDelegate> m_horizontalScrollbarPainterDelegat
e; | 81 RetainPtr<BlinkScrollbarPainterDelegate> m_horizontalScrollbarPainterDelegat
e; |
83 RetainPtr<BlinkScrollbarPainterDelegate> m_verticalScrollbarPainterDelegate; | 82 RetainPtr<BlinkScrollbarPainterDelegate> m_verticalScrollbarPainterDelegate; |
84 | 83 |
85 void initialScrollbarPaintTask(); | 84 void initialScrollbarPaintTask(); |
86 std::unique_ptr<CancellableTaskFactory> m_initialScrollbarPaintTaskFactory; | 85 OwnPtr<CancellableTaskFactory> m_initialScrollbarPaintTaskFactory; |
87 | 86 |
88 void sendContentAreaScrolledTask(); | 87 void sendContentAreaScrolledTask(); |
89 std::unique_ptr<CancellableTaskFactory> m_sendContentAreaScrolledTaskFactory
; | 88 OwnPtr<CancellableTaskFactory> m_sendContentAreaScrolledTaskFactory; |
90 std::unique_ptr<WebTaskRunner> m_taskRunner; | 89 OwnPtr<WebTaskRunner> m_taskRunner; |
91 FloatSize m_contentAreaScrolledTimerScrollDelta; | 90 FloatSize m_contentAreaScrolledTimerScrollDelta; |
92 | 91 |
93 ScrollResult userScroll(ScrollGranularity, const FloatSize& delta) override; | 92 ScrollResult userScroll(ScrollGranularity, const FloatSize& delta) override; |
94 void scrollToOffsetWithoutAnimation(const FloatPoint&) override; | 93 void scrollToOffsetWithoutAnimation(const FloatPoint&) override; |
95 | 94 |
96 void handleWheelEventPhase(PlatformWheelEventPhase) override; | 95 void handleWheelEventPhase(PlatformWheelEventPhase) override; |
97 | 96 |
98 void cancelAnimation() override; | 97 void cancelAnimation() override; |
99 | 98 |
100 void contentAreaWillPaint() const override; | 99 void contentAreaWillPaint() const override; |
(...skipping 27 matching lines...) Expand all Loading... |
128 void immediateScrollTo(const FloatPoint&); | 127 void immediateScrollTo(const FloatPoint&); |
129 | 128 |
130 bool m_haveScrolledSincePageLoad; | 129 bool m_haveScrolledSincePageLoad; |
131 bool m_needsScrollerStyleUpdate; | 130 bool m_needsScrollerStyleUpdate; |
132 IntRect m_visibleScrollerThumbRect; | 131 IntRect m_visibleScrollerThumbRect; |
133 }; | 132 }; |
134 | 133 |
135 } // namespace blink | 134 } // namespace blink |
136 | 135 |
137 #endif // ScrollAnimatorMac_h | 136 #endif // ScrollAnimatorMac_h |
OLD | NEW |