#ifndef WebDragClient_h
#define WebDragClient_h
#include <WebCore/DragClient.h>
#if PLATFORM(MAC)
#ifdef __OBJC__
@class WKPasteboardFilePromiseOwner;
@class WKPasteboardOwner;
#else
class WKPasteboardFilePromiseOwner;
class WKPasteboardOwner;
#endif
#endif
namespace WebKit {
class WebPage;
class WebDragClient : public WebCore::DragClient {
public:
WebDragClient(WebPage* page)
: m_page(page)
{
}
private:
virtual void willPerformDragDestinationAction(WebCore::DragDestinationAction, WebCore::DragData*);
virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::Clipboard*);
virtual WebCore::DragDestinationAction actionMaskForDrag(WebCore::DragData*);
virtual WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint& windowPoint);
virtual void startDrag(WebCore::DragImageRef dragImage, const WebCore::IntPoint& dragImageOrigin, const WebCore::IntPoint& eventPos, WebCore::Clipboard*, WebCore::Frame*, bool linkDrag = false);
#if PLATFORM(MAC)
virtual void declareAndWriteDragImage(NSPasteboard*, DOMElement*, NSURL*, NSString*, WebCore::Frame*);
#endif
virtual void dragEnded();
virtual void dragControllerDestroyed();
WebPage* m_page;
#if PLATFORM(MAC)
RetainPtr<WKPasteboardFilePromiseOwner> m_filePromiseOwner;
RetainPtr<WKPasteboardOwner> m_pasteboardOwner;
#endif
};
}
#endif // WebDragClient_h