OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "platform/PlatformWheelEvent.h" | 35 #include "platform/PlatformWheelEvent.h" |
36 #include "platform/geometry/FloatPoint.h" | 36 #include "platform/geometry/FloatPoint.h" |
37 #include "platform/geometry/FloatSize.h" | 37 #include "platform/geometry/FloatSize.h" |
38 #include "platform/heap/Handle.h" | 38 #include "platform/heap/Handle.h" |
39 #include "platform/scroll/ScrollAnimatorCompositorCoordinator.h" | 39 #include "platform/scroll/ScrollAnimatorCompositorCoordinator.h" |
40 #include "platform/scroll/ScrollTypes.h" | 40 #include "platform/scroll/ScrollTypes.h" |
41 #include "wtf/Forward.h" | 41 #include "wtf/Forward.h" |
42 | 42 |
43 namespace blink { | 43 namespace blink { |
44 | 44 |
| 45 class CompositorAnimationTimeline; |
45 class ScrollableArea; | 46 class ScrollableArea; |
46 class Scrollbar; | 47 class Scrollbar; |
47 class WebCompositorAnimationTimeline; | |
48 | 48 |
49 class PLATFORM_EXPORT ScrollAnimatorBase : public ScrollAnimatorCompositorCoordi
nator { | 49 class PLATFORM_EXPORT ScrollAnimatorBase : public ScrollAnimatorCompositorCoordi
nator { |
50 public: | 50 public: |
51 static PassOwnPtrWillBeRawPtr<ScrollAnimatorBase> create(ScrollableArea*); | 51 static PassOwnPtrWillBeRawPtr<ScrollAnimatorBase> create(ScrollableArea*); |
52 | 52 |
53 virtual ~ScrollAnimatorBase(); | 53 virtual ~ScrollAnimatorBase(); |
54 | 54 |
55 virtual void dispose() { } | 55 virtual void dispose() { } |
56 | 56 |
57 // Computes a scroll destination for the given parameters. The returned | 57 // Computes a scroll destination for the given parameters. The returned |
(...skipping 18 matching lines...) Expand all Loading... |
76 virtual float computeDeltaToConsume(ScrollbarOrientation, float pixelDelta)
const; | 76 virtual float computeDeltaToConsume(ScrollbarOrientation, float pixelDelta)
const; |
77 | 77 |
78 | 78 |
79 // ScrollAnimatorCompositorCoordinator implementation. | 79 // ScrollAnimatorCompositorCoordinator implementation. |
80 ScrollableArea* scrollableArea() const override { return m_scrollableArea; } | 80 ScrollableArea* scrollableArea() const override { return m_scrollableArea; } |
81 void tickAnimation(double monotonicTime) override { }; | 81 void tickAnimation(double monotonicTime) override { }; |
82 void cancelAnimation() override { } | 82 void cancelAnimation() override { } |
83 void updateCompositorAnimations() override { }; | 83 void updateCompositorAnimations() override { }; |
84 void notifyCompositorAnimationFinished(int groupId) override { }; | 84 void notifyCompositorAnimationFinished(int groupId) override { }; |
85 void notifyCompositorAnimationAborted(int groupId) override { }; | 85 void notifyCompositorAnimationAborted(int groupId) override { }; |
86 void layerForCompositedScrollingDidChange(WebCompositorAnimationTimeline*) o
verride { }; | 86 void layerForCompositedScrollingDidChange(CompositorAnimationTimeline*) over
ride { }; |
87 | 87 |
88 virtual void contentAreaWillPaint() const { } | 88 virtual void contentAreaWillPaint() const { } |
89 virtual void mouseEnteredContentArea() const { } | 89 virtual void mouseEnteredContentArea() const { } |
90 virtual void mouseExitedContentArea() const { } | 90 virtual void mouseExitedContentArea() const { } |
91 virtual void mouseMovedInContentArea() const { } | 91 virtual void mouseMovedInContentArea() const { } |
92 virtual void mouseEnteredScrollbar(Scrollbar&) const { } | 92 virtual void mouseEnteredScrollbar(Scrollbar&) const { } |
93 virtual void mouseExitedScrollbar(Scrollbar&) const { } | 93 virtual void mouseExitedScrollbar(Scrollbar&) const { } |
94 virtual void willStartLiveResize() { } | 94 virtual void willStartLiveResize() { } |
95 virtual void updateAfterLayout() { } | 95 virtual void updateAfterLayout() { } |
96 virtual void contentsResized() const { } | 96 virtual void contentsResized() const { } |
(...skipping 24 matching lines...) Expand all Loading... |
121 float clampScrollPosition(ScrollbarOrientation, float) const; | 121 float clampScrollPosition(ScrollbarOrientation, float) const; |
122 | 122 |
123 RawPtrWillBeMember<ScrollableArea> m_scrollableArea; | 123 RawPtrWillBeMember<ScrollableArea> m_scrollableArea; |
124 float m_currentPosX; // We avoid using a FloatPoint in order to reduce | 124 float m_currentPosX; // We avoid using a FloatPoint in order to reduce |
125 float m_currentPosY; // subclass code complexity. | 125 float m_currentPosY; // subclass code complexity. |
126 }; | 126 }; |
127 | 127 |
128 } // namespace blink | 128 } // namespace blink |
129 | 129 |
130 #endif // ScrollAnimatorBase_h | 130 #endif // ScrollAnimatorBase_h |
OLD | NEW |