ScrollableArea should have an optional ScrollableAreaClient
https://bugs.webkit.org/show_bug.cgi?id=74949

Reviewed by Sam Weinig.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* page/FrameView.cpp:
(WebCore::scrollableAreaClient):
(WebCore::FrameView::FrameView):
* page/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::scrollableAreaClientForFrame):
* page/ScrollingCoordinator.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::ScrollView):
* platform/ScrollView.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::ScrollableArea):
* platform/ScrollableArea.h:
* platform/ScrollableAreaClient.h: Added.
(WebCore::ScrollableAreaClient::~ScrollableAreaClient):
(WebCore::ScrollableAreaClient::ScrollableAreaClient):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103342 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/platform/ScrollableArea.h b/Source/WebCore/platform/ScrollableArea.h
index 44e3732..5daf610 100644
--- a/Source/WebCore/platform/ScrollableArea.h
+++ b/Source/WebCore/platform/ScrollableArea.h
@@ -36,6 +36,7 @@
 class PlatformGestureEvent;
 class PlatformWheelEvent;
 class ScrollAnimator;
+class ScrollableAreaClient;
 #if USE(ACCELERATED_COMPOSITING)
 class GraphicsLayer;
 #endif
@@ -44,9 +45,6 @@
 public:
     enum ZoomAnimationState { ZoomAnimationContinuing, ZoomAnimationFinishing };
 
-    ScrollableArea();
-    virtual ~ScrollableArea();
-
     bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1);
     void scrollToOffsetWithoutAnimation(const FloatPoint&);
     void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset);
@@ -166,6 +164,9 @@
     void setScrollOffsetFromInternals(const IntPoint&);
 
 protected:
+    explicit ScrollableArea(ScrollableAreaClient* = 0);
+    virtual ~ScrollableArea();
+
     void setScrollOrigin(const IntPoint&);
     void setScrollOriginX(int);
     void setScrollOriginY(int);
@@ -187,6 +188,8 @@
     bool hasLayerForScrollCorner() const;
 
 private:
+    ScrollableAreaClient* m_client;
+
     // NOTE: Only called from the ScrollAnimator.
     friend class ScrollAnimator;
     void setScrollOffsetFromAnimation(const IntPoint&);