41 class DragClient { 42 public: 43 virtual void dragControllerDestroyed() = 0; 44 45 virtual void willPerformDragDestinationAction(DragDestinationAction, const DragData&) = 0; 46 virtual void willPerformDragSourceAction(DragSourceAction, const IntPoint&, DataTransfer&) = 0; 47 virtual DragDestinationAction actionMaskForDrag(const DragData&) = 0; 48 virtual DragSourceAction dragSourceActionMaskForPoint(const IntPoint& rootViewPoint) = 0; 49 50 virtual void startDrag(DragImage, const IntPoint& dragImageOrigin, const IntPoint& eventPos, const FloatPoint& dragImageAnchor, DataTransfer&, Frame&, DragSourceAction) = 0; 51 virtual void dragEnded() { } 52 53 #if PLATFORM(COCOA) 54 // Mac-specific helper function to allow access to web archives and NSPasteboard extras in WebKit. 55 // This is not abstract as that would require another #if PLATFORM(COCOA) for the SVGImage client empty implentation. 56 virtual void declareAndWriteDragImage(const String&, Element&, const URL&, const String&, Frame*) { } 57 #if ENABLE(ATTACHMENT_ELEMENT) 58 virtual void declareAndWriteAttachment(const String&, Element&, const URL&, const String&, Frame*) { } 59 #endif 60 #endif 61 62 virtual ~DragClient() { } 63 }; 64 65 } // namespace WebCore | 41 class DragClient { 42 public: 43 virtual void dragControllerDestroyed() = 0; 44 45 virtual void willPerformDragDestinationAction(DragDestinationAction, const DragData&) = 0; 46 virtual void willPerformDragSourceAction(DragSourceAction, const IntPoint&, DataTransfer&) = 0; 47 virtual DragDestinationAction actionMaskForDrag(const DragData&) = 0; 48 virtual DragSourceAction dragSourceActionMaskForPoint(const IntPoint& rootViewPoint) = 0; 49 50 virtual void startDrag(DragImage, const IntPoint& dragImageOrigin, const IntPoint& eventPos, const FloatPoint& dragImageAnchor, DataTransfer&, Frame&, DragSourceAction) = 0; 51 virtual void dragEnded() { } 52 53 #if PLATFORM(COCOA) 54 // Mac-specific helper function to allow access to web archives and NSPasteboard extras in WebKit. 55 // This is not abstract as that would require another #if PLATFORM(COCOA) for the SVGImage client empty implentation. 56 virtual void declareAndWriteDragImage(const String&, Element&, const URL&, const String&, Frame*) { } 57 #if ENABLE(ATTACHMENT_ELEMENT) 58 virtual void declareAndWriteAttachment(const String&, Element&, const URL&, const String&, Frame*) { } 59 #endif 60 #endif 61 #if PLATFORM(JAVA) 62 virtual void updateFileExtension(const URL&) { } 63 #endif 64 65 virtual ~DragClient() { } 66 }; 67 68 } // namespace WebCore |