RemoteScrollingTree.h [plain text]
#ifndef RemoteScrollingTree_h
#define RemoteScrollingTree_h
#if ENABLE(ASYNC_SCROLLING)
#include "RemoteScrollingCoordinator.h"
#include <WebCore/ScrollingConstraints.h>
#include <WebCore/ScrollingTree.h>
namespace WebKit {
class RemoteScrollingCoordinatorProxy;
class RemoteScrollingTree : public WebCore::ScrollingTree {
public:
static RefPtr<RemoteScrollingTree> create(RemoteScrollingCoordinatorProxy&);
virtual ~RemoteScrollingTree();
virtual bool isRemoteScrollingTree() const override { return true; }
virtual EventResult tryToHandleWheelEvent(const WebCore::PlatformWheelEvent&) override;
const RemoteScrollingCoordinatorProxy& scrollingCoordinatorProxy() const { return m_scrollingCoordinatorProxy; }
virtual void scrollingTreeNodeDidScroll(WebCore::ScrollingNodeID, const WebCore::FloatPoint& scrollPosition, WebCore::SetOrSyncScrollingLayerPosition = WebCore::SyncScrollingLayerPosition) override;
virtual void scrollingTreeNodeRequestsScroll(WebCore::ScrollingNodeID, const WebCore::FloatPoint& scrollPosition, bool representsProgrammaticScroll) override;
private:
explicit RemoteScrollingTree(RemoteScrollingCoordinatorProxy&);
#if PLATFORM(MAC)
virtual void handleWheelEventPhase(WebCore::PlatformWheelEventPhase) override;
#endif
#if PLATFORM(IOS)
virtual WebCore::FloatRect fixedPositionRect() override;
virtual void scrollingTreeNodeWillStartPanGesture() override;
virtual void scrollingTreeNodeWillStartScroll() override;
virtual void scrollingTreeNodeDidEndScroll() override;
#endif
virtual PassRefPtr<WebCore::ScrollingTreeNode> createScrollingTreeNode(WebCore::ScrollingNodeType, WebCore::ScrollingNodeID) override;
RemoteScrollingCoordinatorProxy& m_scrollingCoordinatorProxy;
};
SCROLLING_TREE_TYPE_CASTS(RemoteScrollingTree, isRemoteScrollingTree());
}
#endif // ENABLE(ASYNC_SCROLLING)
#endif // RemoteScrollingTree_h