2 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this program; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
21 #ifndef TapHighlightController_h
22 #define TapHighlightController_h
24 #if ENABLE(TOUCH_EVENTS)
26 #include "PageOverlay.h"
27 #include <WebCore/Color.h>
28 #include <WebCore/Path.h>
29 #include <wtf/Forward.h>
30 #include <wtf/Noncopyable.h>
31 #include <wtf/Vector.h>
43 class TapHighlightController : private PageOverlay::Client {
44 WTF_MAKE_NONCOPYABLE(TapHighlightController);
47 explicit TapHighlightController(WebPage*);
48 virtual ~TapHighlightController();
50 void highlight(WebCore::Node*);
54 // PageOverlay::Client.
55 virtual void pageOverlayDestroyed(PageOverlay*);
56 virtual void willMoveToWebPage(PageOverlay*, WebPage*);
57 virtual void didMoveToWebPage(PageOverlay*, WebPage*);
58 virtual bool mouseEvent(PageOverlay*, const WebMouseEvent&);
59 virtual void drawRect(PageOverlay*, WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect);
63 PageOverlay* m_overlay;
66 WebCore::Color m_color;
71 #endif // ENABLE(TOUCH_EVENTS)
73 #endif // TapHighlightController_h