| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 class Document; | 40 class Document; |
| 41 class DragData; | 41 class DragData; |
| 42 class DragImage; | 42 class DragImage; |
| 43 struct DragSession; | 43 struct DragSession; |
| 44 class DragState; | 44 class DragState; |
| 45 class LocalFrame; | 45 class LocalFrame; |
| 46 class FrameSelection; | 46 class FrameSelection; |
| 47 class HTMLInputElement; | 47 class HTMLInputElement; |
| 48 class Node; | 48 class Node; |
| 49 class Page; | 49 class Page; |
| 50 class PlatformMouseEvent; | 50 class WebMouseEvent; |
| 51 | 51 |
| 52 class CORE_EXPORT DragController final | 52 class CORE_EXPORT DragController final |
| 53 : public GarbageCollected<DragController> { | 53 : public GarbageCollected<DragController> { |
| 54 WTF_MAKE_NONCOPYABLE(DragController); | 54 WTF_MAKE_NONCOPYABLE(DragController); |
| 55 | 55 |
| 56 public: | 56 public: |
| 57 static DragController* create(Page*); | 57 static DragController* create(Page*); |
| 58 | 58 |
| 59 DragSession dragEnteredOrUpdated(DragData*, LocalFrame& localRoot); | 59 DragSession dragEnteredOrUpdated(DragData*, LocalFrame& localRoot); |
| 60 void dragExited(DragData*, LocalFrame& localRoot); | 60 void dragExited(DragData*, LocalFrame& localRoot); |
| 61 bool performDrag(DragData*, LocalFrame& localRoot); | 61 bool performDrag(DragData*, LocalFrame& localRoot); |
| 62 | 62 |
| 63 enum SelectionDragPolicy { | 63 enum SelectionDragPolicy { |
| 64 ImmediateSelectionDragResolution, | 64 ImmediateSelectionDragResolution, |
| 65 DelayedSelectionDragResolution, | 65 DelayedSelectionDragResolution, |
| 66 }; | 66 }; |
| 67 Node* draggableNode(const LocalFrame*, | 67 Node* draggableNode(const LocalFrame*, |
| 68 Node*, | 68 Node*, |
| 69 const IntPoint&, | 69 const IntPoint&, |
| 70 SelectionDragPolicy, | 70 SelectionDragPolicy, |
| 71 DragSourceAction&) const; | 71 DragSourceAction&) const; |
| 72 void dragEnded(); | 72 void dragEnded(); |
| 73 | 73 |
| 74 bool populateDragDataTransfer(LocalFrame* src, | 74 bool populateDragDataTransfer(LocalFrame* src, |
| 75 const DragState&, | 75 const DragState&, |
| 76 const IntPoint& dragOrigin); | 76 const IntPoint& dragOrigin); |
| 77 bool startDrag(LocalFrame* src, | 77 bool startDrag(LocalFrame* src, |
| 78 const DragState&, | 78 const DragState&, |
| 79 const PlatformMouseEvent& dragEvent, | 79 const WebMouseEvent& dragEvent, |
| 80 const IntPoint& dragOrigin); | 80 const IntPoint& dragOrigin); |
| 81 | 81 |
| 82 DECLARE_TRACE(); | 82 DECLARE_TRACE(); |
| 83 | 83 |
| 84 private: | 84 private: |
| 85 DragController(Page*); | 85 DragController(Page*); |
| 86 | 86 |
| 87 DispatchEventResult dispatchTextInputEventFor(LocalFrame*, DragData*); | 87 DispatchEventResult dispatchTextInputEventFor(LocalFrame*, DragData*); |
| 88 bool canProcessDrag(DragData*, LocalFrame& localRoot); | 88 bool canProcessDrag(DragData*, LocalFrame& localRoot); |
| 89 bool concludeEditDrag(DragData*); | 89 bool concludeEditDrag(DragData*); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 117 Member<HTMLInputElement> m_fileInputElementUnderMouse; | 117 Member<HTMLInputElement> m_fileInputElementUnderMouse; |
| 118 bool m_documentIsHandlingDrag; | 118 bool m_documentIsHandlingDrag; |
| 119 | 119 |
| 120 DragDestinationAction m_dragDestinationAction; | 120 DragDestinationAction m_dragDestinationAction; |
| 121 bool m_didInitiateDrag; | 121 bool m_didInitiateDrag; |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 } // namespace blink | 124 } // namespace blink |
| 125 | 125 |
| 126 #endif // DragController_h | 126 #endif // DragController_h |
| OLD | NEW |