| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 : public GarbageCollectedFinalized<DataTransfer>, | 54 : public GarbageCollectedFinalized<DataTransfer>, |
| 55 public ScriptWrappable { | 55 public ScriptWrappable { |
| 56 DEFINE_WRAPPERTYPEINFO(); | 56 DEFINE_WRAPPERTYPEINFO(); |
| 57 | 57 |
| 58 public: | 58 public: |
| 59 // Whether this transfer is serving a drag-drop, copy-paste, spellcheck, | 59 // Whether this transfer is serving a drag-drop, copy-paste, spellcheck, |
| 60 // auto-correct or similar request. | 60 // auto-correct or similar request. |
| 61 enum DataTransferType { | 61 enum DataTransferType { |
| 62 CopyAndPaste, | 62 CopyAndPaste, |
| 63 DragAndDrop, | 63 DragAndDrop, |
| 64 InsertReplacementText, | 64 InputEvent, |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 static DataTransfer* create(DataTransferType, | 67 static DataTransfer* create(DataTransferType, |
| 68 DataTransferAccessPolicy, | 68 DataTransferAccessPolicy, |
| 69 DataObject*); | 69 DataObject*); |
| 70 static DataTransfer* createForInputEvent(const String& plainText, |
| 71 const String& htmlText); |
| 70 ~DataTransfer(); | 72 ~DataTransfer(); |
| 71 | 73 |
| 72 bool isForCopyAndPaste() const { return m_transferType == CopyAndPaste; } | 74 bool isForCopyAndPaste() const { return m_transferType == CopyAndPaste; } |
| 73 bool isForDragAndDrop() const { return m_transferType == DragAndDrop; } | 75 bool isForDragAndDrop() const { return m_transferType == DragAndDrop; } |
| 74 | 76 |
| 75 String dropEffect() const { | 77 String dropEffect() const { |
| 76 return dropEffectIsUninitialized() ? "none" : m_dropEffect; | 78 return dropEffectIsUninitialized() ? "none" : m_dropEffect; |
| 77 } | 79 } |
| 78 void setDropEffect(const String&); | 80 void setDropEffect(const String&); |
| 79 bool dropEffectIsUninitialized() const { | 81 bool dropEffectIsUninitialized() const { |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 Member<Node> m_dragImageElement; | 149 Member<Node> m_dragImageElement; |
| 148 }; | 150 }; |
| 149 | 151 |
| 150 DragOperation convertDropZoneOperationToDragOperation( | 152 DragOperation convertDropZoneOperationToDragOperation( |
| 151 const String& dragOperation); | 153 const String& dragOperation); |
| 152 String convertDragOperationToDropZoneOperation(DragOperation); | 154 String convertDragOperationToDropZoneOperation(DragOperation); |
| 153 | 155 |
| 154 } // namespace blink | 156 } // namespace blink |
| 155 | 157 |
| 156 #endif // DataTransfer_h | 158 #endif // DataTransfer_h |
| OLD | NEW |