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