SmartMagnificationController.h [plain text]
#ifndef SmartMagnificationController_h
#define SmartMagnificationController_h
#if PLATFORM(IOS)
#include "MessageReceiver.h"
#include <WebCore/FloatRect.h>
#include <wtf/Noncopyable.h>
#include <wtf/RetainPtr.h>
OBJC_CLASS WKContentView;
OBJC_CLASS UIScrollView;
namespace WebKit {
class WebPageProxy;
class SmartMagnificationController : private IPC::MessageReceiver {
WTF_MAKE_NONCOPYABLE(SmartMagnificationController);
public:
SmartMagnificationController(WKContentView *);
~SmartMagnificationController();
void handleSmartMagnificationGesture(WebCore::FloatPoint origin);
void handleResetMagnificationGesture(WebCore::FloatPoint origin);
private:
void didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&) override;
void didCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect renderRect, WebCore::FloatRect visibleContentBounds, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale);
void magnify(WebCore::FloatPoint origin, WebCore::FloatRect targetRect, WebCore::FloatRect visibleContentRect, double viewportMinimumScale, double viewportMaximumScale);
void adjustSmartMagnificationTargetRectAndZoomScales(bool addMagnificationPadding, WebCore::FloatRect& targetRect, double& minimumScale, double& maximumScale);
WebPageProxy& m_webPageProxy;
WKContentView *m_contentView;
};
}
#endif // PLATFORM(IOS)
#endif // SmartMagnificationController_h