MockPageOverlayClient.h [plain text]
#ifndef MockPageOverlayClient_h
#define MockPageOverlayClient_h
#include "PageOverlay.h"
#include <wtf/HashSet.h>
namespace WebCore {
class MainFrame;
class MockPageOverlayClient final : public PageOverlay::Client {
friend class NeverDestroyed<MockPageOverlayClient>;
public:
static MockPageOverlayClient& singleton();
explicit MockPageOverlayClient();
void installOverlay(MainFrame&, PageOverlay::OverlayType);
void uninstallAllOverlays();
String layerTreeAsText(MainFrame&);
virtual ~MockPageOverlayClient() { }
private:
virtual void pageOverlayDestroyed(PageOverlay&) override;
virtual void willMoveToPage(PageOverlay&, Page*) override;
virtual void didMoveToPage(PageOverlay&, Page*) override;
virtual void drawRect(PageOverlay&, GraphicsContext&, const IntRect& dirtyRect) override;
virtual bool mouseEvent(PageOverlay&, const PlatformMouseEvent&) override;
virtual void didScrollFrame(PageOverlay&, Frame&) override;
virtual bool copyAccessibilityAttributeStringValueForPoint(PageOverlay&, String , FloatPoint, String&) override;
virtual bool copyAccessibilityAttributeBoolValueForPoint(PageOverlay&, String , FloatPoint, bool&) override;
virtual Vector<String> copyAccessibilityAttributeNames(PageOverlay&, bool ) override;
HashSet<PageOverlay*> m_overlays;
};
}
#endif // MockPageOverlayClient_h