#ifndef PageWidgetDelegate_h
#define PageWidgetDelegate_h
-#include "WebWidget.h"
-#include "core/page/Page.h"
#include "public/platform/WebCanvas.h"
+#include "public/web/WebWidget.h"
#include "wtf/OwnPtr.h"
-namespace WebCore {
-class Frame;
-class Page;
-}
-
namespace blink {
+class LocalFrame;
+class Page;
class PageOverlayList;
class WebGestureEvent;
class WebInputEvent;
class PageWidgetEventHandler {
public:
- virtual void handleMouseMove(WebCore::Frame& mainFrame, const WebMouseEvent&);
- virtual void handleMouseLeave(WebCore::Frame& mainFrame, const WebMouseEvent&);
- virtual void handleMouseDown(WebCore::Frame& mainFrame, const WebMouseEvent&);
- virtual void handleMouseUp(WebCore::Frame& mainFrame, const WebMouseEvent&);
- virtual bool handleMouseWheel(WebCore::Frame& mainFrame, const WebMouseWheelEvent&);
+ virtual void handleMouseMove(LocalFrame& mainFrame, const WebMouseEvent&);
+ virtual void handleMouseLeave(LocalFrame& mainFrame, const WebMouseEvent&);
+ virtual void handleMouseDown(LocalFrame& mainFrame, const WebMouseEvent&);
+ virtual void handleMouseUp(LocalFrame& mainFrame, const WebMouseEvent&);
+ virtual bool handleMouseWheel(LocalFrame& mainFrame, const WebMouseWheelEvent&);
virtual bool handleKeyEvent(const WebKeyboardEvent&) = 0;
virtual bool handleCharEvent(const WebKeyboardEvent&) = 0;
virtual bool handleGestureEvent(const WebGestureEvent&) = 0;
- virtual bool handleTouchEvent(WebCore::Frame& mainFrame, const WebTouchEvent&);
+ virtual bool handleTouchEvent(LocalFrame& mainFrame, const WebTouchEvent&);
virtual ~PageWidgetEventHandler() { }
};
Opaque,
Translucent,
};
- static void animate(WebCore::Page*, double monotonicFrameBeginTime);
- static void layout(WebCore::Page*);
- static void paint(WebCore::Page*, PageOverlayList*, WebCanvas*, const WebRect&, CanvasBackground);
- static bool handleInputEvent(WebCore::Page*, PageWidgetEventHandler&, const WebInputEvent&);
+ // rootFrame arguments indicate a root localFrame from which to start performing the
+ // specified operation. If rootFrame is 0, these methods will attempt to use the
+ // Page's mainFrame(), if it is a LocalFrame.
+ static void animate(Page*, double monotonicFrameBeginTime, LocalFrame* rootFrame = 0);
+ static void layout(Page*, LocalFrame* rootFrame = 0);
+ static void paint(Page*, PageOverlayList*, WebCanvas*, const WebRect&, CanvasBackground, LocalFrame* rootFrame = 0);
+ static bool handleInputEvent(Page*, PageWidgetEventHandler&, const WebInputEvent&, LocalFrame* rootFrame = 0);
private:
PageWidgetDelegate() { }