OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) |
3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) | 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) |
4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
5 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 14 matching lines...) Expand all Loading... |
25 #define DataTransfer_h | 25 #define DataTransfer_h |
26 | 26 |
27 #include "bindings/core/v8/ScriptWrappable.h" | 27 #include "bindings/core/v8/ScriptWrappable.h" |
28 #include "core/CoreExport.h" | 28 #include "core/CoreExport.h" |
29 #include "core/clipboard/DataTransferAccessPolicy.h" | 29 #include "core/clipboard/DataTransferAccessPolicy.h" |
30 #include "core/fetch/ImageResource.h" | 30 #include "core/fetch/ImageResource.h" |
31 #include "core/page/DragActions.h" | 31 #include "core/page/DragActions.h" |
32 #include "platform/geometry/IntPoint.h" | 32 #include "platform/geometry/IntPoint.h" |
33 #include "platform/heap/Handle.h" | 33 #include "platform/heap/Handle.h" |
34 #include "wtf/Forward.h" | 34 #include "wtf/Forward.h" |
| 35 #include <memory> |
35 | 36 |
36 namespace blink { | 37 namespace blink { |
37 | 38 |
38 class DataObject; | 39 class DataObject; |
39 class DataTransferItemList; | 40 class DataTransferItemList; |
40 class DragImage; | 41 class DragImage; |
41 class Element; | 42 class Element; |
42 class FileList; | 43 class FileList; |
43 class FrameSelection; | 44 class FrameSelection; |
44 class LocalFrame; | 45 class LocalFrame; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // extensions beyond IE's API | 77 // extensions beyond IE's API |
77 Vector<String> types() const; | 78 Vector<String> types() const; |
78 FileList* files() const; | 79 FileList* files() const; |
79 | 80 |
80 IntPoint dragLocation() const { return m_dragLoc; } | 81 IntPoint dragLocation() const { return m_dragLoc; } |
81 void setDragImage(Element*, int x, int y); | 82 void setDragImage(Element*, int x, int y); |
82 void clearDragImage(); | 83 void clearDragImage(); |
83 void setDragImageResource(ImageResource*, const IntPoint&); | 84 void setDragImageResource(ImageResource*, const IntPoint&); |
84 void setDragImageElement(Node*, const IntPoint&); | 85 void setDragImageElement(Node*, const IntPoint&); |
85 | 86 |
86 PassOwnPtr<DragImage> createDragImage(IntPoint& dragLocation, LocalFrame*) c
onst; | 87 std::unique_ptr<DragImage> createDragImage(IntPoint& dragLocation, LocalFram
e*) const; |
87 void declareAndWriteDragImage(Element*, const KURL&, const String& title); | 88 void declareAndWriteDragImage(Element*, const KURL&, const String& title); |
88 void writeURL(Node*, const KURL&, const String&); | 89 void writeURL(Node*, const KURL&, const String&); |
89 void writeSelection(const FrameSelection&); | 90 void writeSelection(const FrameSelection&); |
90 | 91 |
91 void setAccessPolicy(DataTransferAccessPolicy); | 92 void setAccessPolicy(DataTransferAccessPolicy); |
92 bool canReadTypes() const; | 93 bool canReadTypes() const; |
93 bool canReadData() const; | 94 bool canReadData() const; |
94 bool canWriteData() const; | 95 bool canWriteData() const; |
95 // Note that the spec doesn't actually allow drag image modification outside
the dragstart | 96 // Note that the spec doesn't actually allow drag image modification outside
the dragstart |
96 // event. This capability is maintained for backwards compatiblity for ports
that have | 97 // event. This capability is maintained for backwards compatiblity for ports
that have |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 Member<ImageResource> m_dragImage; | 131 Member<ImageResource> m_dragImage; |
131 Member<Node> m_dragImageElement; | 132 Member<Node> m_dragImageElement; |
132 }; | 133 }; |
133 | 134 |
134 DragOperation convertDropZoneOperationToDragOperation(const String& dragOperatio
n); | 135 DragOperation convertDropZoneOperationToDragOperation(const String& dragOperatio
n); |
135 String convertDragOperationToDropZoneOperation(DragOperation); | 136 String convertDragOperationToDropZoneOperation(DragOperation); |
136 | 137 |
137 } // namespace blink | 138 } // namespace blink |
138 | 139 |
139 #endif // DataTransfer_h | 140 #endif // DataTransfer_h |
OLD | NEW |