TapHighlightController.h [plain text]
#ifndef TapHighlightController_h
#define TapHighlightController_h
#if ENABLE(TOUCH_EVENTS)
#include "PageOverlay.h"
#include <WebCore/Color.h>
#include <WebCore/Path.h>
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
#include <wtf/Vector.h>
namespace WebCore {
class Frame;
class IntRect;
class Node;
}
namespace WebKit {
class WebPage;
class TapHighlightController : private PageOverlay::Client {
WTF_MAKE_NONCOPYABLE(TapHighlightController);
public:
explicit TapHighlightController(WebPage*);
virtual ~TapHighlightController();
void highlight(WebCore::Node*);
void hideHighlight();
private:
virtual void pageOverlayDestroyed(PageOverlay*);
virtual void willMoveToWebPage(PageOverlay*, WebPage*);
virtual void didMoveToWebPage(PageOverlay*, WebPage*);
virtual bool mouseEvent(PageOverlay*, const WebMouseEvent&);
virtual void drawRect(PageOverlay*, WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect);
private:
WebPage* m_webPage;
PageOverlay* m_overlay;
WebCore::Path m_path;
WebCore::Color m_color;
};
}
#endif // ENABLE(TOUCH_EVENTS)
#endif // TapHighlightController_h