ViewGestureGeometryCollector.h [plain text]
#ifndef ViewGestureGeometryCollector_h
#define ViewGestureGeometryCollector_h
#include "MessageReceiver.h"
#include <wtf/RunLoop.h>
namespace WebCore {
class FloatPoint;
class FloatRect;
class Node;
}
namespace WebKit {
class WebPage;
class ViewGestureGeometryCollector : private IPC::MessageReceiver {
public:
ViewGestureGeometryCollector(WebPage&);
~ViewGestureGeometryCollector();
void mainFrameDidLayout();
private:
void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
void collectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin);
#if PLATFORM(MAC)
void collectGeometryForMagnificationGesture();
void setRenderTreeSizeNotificationThreshold(uint64_t size) { m_renderTreeSizeNotificationThreshold = size; }
void renderTreeSizeNotificationTimerFired();
#endif
void dispatchDidCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect targetRect, WebCore::FloatRect visibleContentRect, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale);
void computeZoomInformationForNode(WebCore::Node&, WebCore::FloatPoint& origin, WebCore::FloatRect& renderRect, bool& isReplaced, double& viewportMinimumScale, double& viewportMaximumScale);
WebPage& m_webPage;
#if PLATFORM(MAC)
uint64_t m_renderTreeSizeNotificationThreshold;
#endif
};
}
#endif // ViewGestureGeometryCollector