Chromium Code Reviews| Index: Source/core/page/AutoscrollController.h |
| diff --git a/Source/core/page/AutoscrollController.h b/Source/core/page/AutoscrollController.h |
| index 361581c92cee2eff46f8efe8177cbf06f64dcc02..b7a9f0f86e3b0faf9868beec09eb8fe4b75cb0d1 100644 |
| --- a/Source/core/page/AutoscrollController.h |
| +++ b/Source/core/page/AutoscrollController.h |
| @@ -26,7 +26,6 @@ |
| #ifndef AutoscrollController_h |
| #define AutoscrollController_h |
| -#include "platform/Timer.h" |
| #include "platform/geometry/IntPoint.h" |
| #include "wtf/PassOwnPtr.h" |
| @@ -36,6 +35,7 @@ class EventHandler; |
| class Frame; |
| class FrameView; |
| class Node; |
| +class Page; |
| class PlatformMouseEvent; |
| class RenderBox; |
| class RenderObject; |
| @@ -53,12 +53,14 @@ enum AutoscrollType { |
| // AutscrollController handels autoscroll and pan scroll for EventHandler. |
| class AutoscrollController { |
| public: |
| + static PassOwnPtr<AutoscrollController> create(Page*); |
|
esprehn
2013/11/01 19:37:37
This should probably be a reference.
|
| + |
| + void animate(double monotonicFrameBeginTime); |
| bool autoscrollInProgress() const; |
| bool autoscrollInProgress(const RenderBox*) const; |
| - static PassOwnPtr<AutoscrollController> create(); |
| bool panScrollInProgress() const; |
| void startAutoscrollForSelection(RenderObject*); |
| - void stopAutoscrollTimer(); |
| + void stopAutoscroll(); |
| void stopAutoscrollIfNeeded(RenderObject*); |
| void updateAutoscrollRenderer(); |
| void updateDragAndDrop(Node* targetNode, const IntPoint& eventPosition, double eventTime); |
| @@ -68,14 +70,16 @@ public: |
| #endif |
| private: |
| - AutoscrollController(); |
| - void autoscrollTimerFired(Timer<AutoscrollController>*); |
| - void startAutoscrollTimer(); |
| + explicit AutoscrollController(Page*); |
|
esprehn
2013/11/01 19:37:37
This should probably be a reference.
|
| + |
| + void startAutoscroll(); |
| + |
| #if OS(WIN) |
| - void updatePanScrollState(FrameView*, const IntPoint&); |
| + void updatePanScrollState(FrameView*, const IntPoint& lastKnownMousePosition); |
| #endif |
| - Timer<AutoscrollController> m_autoscrollTimer; |
| + Page* m_page; |
| + bool m_autoscrollActive; |
| RenderBox* m_autoscrollRenderer; |
| AutoscrollType m_autoscrollType; |
| IntPoint m_dragAndDropAutoscrollReferencePosition; |