| Index: Source/platform/scroll/ProgrammaticScrollAnimator.h
|
| diff --git a/Source/core/xml/parser/SharedBufferReader.h b/Source/platform/scroll/ProgrammaticScrollAnimator.h
|
| similarity index 61%
|
| copy from Source/core/xml/parser/SharedBufferReader.h
|
| copy to Source/platform/scroll/ProgrammaticScrollAnimator.h
|
| index 7217de95fcf74bdadcf451da55088bc4eeda8fb7..f90f0ce7d8723246202b62d2304692926cb6d018 100644
|
| --- a/Source/core/xml/parser/SharedBufferReader.h
|
| +++ b/Source/platform/scroll/ProgrammaticScrollAnimator.h
|
| @@ -28,33 +28,52 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef SharedBufferReader_h
|
| -#define SharedBufferReader_h
|
| +#ifndef ProgrammaticScrollAnimator_h
|
| +#define ProgrammaticScrollAnimator_h
|
|
|
| +#include "platform/geometry/FloatPoint.h"
|
| #include "wtf/FastAllocBase.h"
|
| -#include "wtf/Forward.h"
|
| -#include "wtf/RefPtr.h"
|
| +#include "wtf/Noncopyable.h"
|
| +#include "wtf/OwnPtr.h"
|
| +#include "wtf/PassOwnPtr.h"
|
| +
|
| +namespace blink {
|
| +class WebScrollOffsetAnimationCurve;
|
| +}
|
|
|
| namespace WebCore {
|
|
|
| -class SharedBuffer;
|
| +class ScrollableArea;
|
|
|
| -// Allows transfer of data in multiple chunks from a SharedBuffer to a provided buffer.
|
| -class SharedBufferReader {
|
| +class ProgrammaticScrollAnimator {
|
| + WTF_MAKE_NONCOPYABLE(ProgrammaticScrollAnimator);
|
| WTF_MAKE_FAST_ALLOCATED;
|
| public:
|
| - SharedBufferReader(PassRefPtr<SharedBuffer>);
|
| + static PassOwnPtr<ProgrammaticScrollAnimator> create(ScrollableArea*);
|
| +
|
| + ~ProgrammaticScrollAnimator();
|
| +
|
| + void animateToOffset(FloatPoint);
|
| + void cancelAnimation();
|
| + void tickAnimation(double monotonicTime);
|
|
|
| - ~SharedBufferReader();
|
| + void notifyAnimationStarted(double monotonicTime);
|
| + void notifyAnimationFinished(double monotonicTime);
|
|
|
| - // Returns the number of bytes that were read (i.e. written to |outputBuffer|).
|
| - int readData(char* outputBuffer, unsigned askedToRead);
|
| + void canUseCompositedScrollAnimationsDidChange();
|
|
|
| private:
|
| - RefPtr<SharedBuffer> m_buffer;
|
| - unsigned m_currentOffset;
|
| + explicit ProgrammaticScrollAnimator(ScrollableArea*);
|
| +
|
| + void resetAnimationState();
|
| +
|
| + ScrollableArea* m_scrollableArea;
|
| + OwnPtr<blink::WebScrollOffsetAnimationCurve> m_animationCurve;
|
| + FloatPoint m_targetOffset;
|
| + int m_animationId;
|
| + double m_startTime;
|
| };
|
|
|
| } // namespace WebCore
|
|
|
| -#endif // SharedBufferReader_h
|
| +#endif // ProgrammaticScrollAnimator_h
|
|
|