| 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 30 matching lines...) Expand all Loading... |
| 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 CompositorAnimationTimeline; |
| 46 class ScrollableArea; | 46 class ScrollableArea; |
| 47 class Scrollbar; | 47 class Scrollbar; |
| 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 RawPtr<ScrollAnimatorBase> create(ScrollableArea*); |
| 52 | 52 |
| 53 virtual ~ScrollAnimatorBase(); | 53 virtual ~ScrollAnimatorBase(); |
| 54 | 54 |
| 55 virtual void dispose() { } | 55 virtual void dispose() { } |
| 56 | 56 |
| 57 // A possibly animated scroll. The base class implementation always scrolls | 57 // A possibly animated scroll. The base class implementation always scrolls |
| 58 // immediately, never animates. If the scroll is animated and currently the | 58 // immediately, never animates. If the scroll is animated and currently the |
| 59 // animator has an in-progress animation, the ScrollResult will always retur
n | 59 // animator has an in-progress animation, the ScrollResult will always retur
n |
| 60 // no unusedDelta and didScroll=true, i.e. fully consuming the scroll reques
t. | 60 // no unusedDelta and didScroll=true, i.e. fully consuming the scroll reques
t. |
| 61 // This makes animations latch to a single scroller. Note, the semantics are | 61 // This makes animations latch to a single scroller. Note, the semantics are |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 virtual bool setScrollbarsVisibleForTesting(bool) { return false; } | 112 virtual bool setScrollbarsVisibleForTesting(bool) { return false; } |
| 113 | 113 |
| 114 DECLARE_VIRTUAL_TRACE(); | 114 DECLARE_VIRTUAL_TRACE(); |
| 115 | 115 |
| 116 protected: | 116 protected: |
| 117 explicit ScrollAnimatorBase(ScrollableArea*); | 117 explicit ScrollAnimatorBase(ScrollableArea*); |
| 118 | 118 |
| 119 virtual void notifyPositionChanged(); | 119 virtual void notifyPositionChanged(); |
| 120 | 120 |
| 121 RawPtrWillBeMember<ScrollableArea> m_scrollableArea; | 121 Member<ScrollableArea> m_scrollableArea; |
| 122 | 122 |
| 123 FloatPoint m_currentPos; | 123 FloatPoint m_currentPos; |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 } // namespace blink | 126 } // namespace blink |
| 127 | 127 |
| 128 #endif // ScrollAnimatorBase_h | 128 #endif // ScrollAnimatorBase_h |
| OLD | NEW |