| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 PlatformMouseEvent; |
| 51 | 51 |
| 52 class CORE_EXPORT DragController final : public NoBaseWillBeGarbageCollectedFina
lized<DragController> { | 52 class CORE_EXPORT DragController final : public GarbageCollectedFinalized<DragCo
ntroller> { |
| 53 WTF_MAKE_NONCOPYABLE(DragController); | 53 WTF_MAKE_NONCOPYABLE(DragController); |
| 54 USING_FAST_MALLOC_WILL_BE_REMOVED(DragController); | |
| 55 public: | 54 public: |
| 56 ~DragController(); | 55 ~DragController(); |
| 57 | 56 |
| 58 static PassOwnPtrWillBeRawPtr<DragController> create(Page*, DragClient*); | 57 static RawPtr<DragController> create(Page*, DragClient*); |
| 59 | 58 |
| 60 DragSession dragEntered(DragData*); | 59 DragSession dragEntered(DragData*); |
| 61 void dragExited(DragData*); | 60 void dragExited(DragData*); |
| 62 DragSession dragUpdated(DragData*); | 61 DragSession dragUpdated(DragData*); |
| 63 bool performDrag(DragData*); | 62 bool performDrag(DragData*); |
| 64 | 63 |
| 65 enum SelectionDragPolicy { | 64 enum SelectionDragPolicy { |
| 66 ImmediateSelectionDragResolution, | 65 ImmediateSelectionDragResolution, |
| 67 DelayedSelectionDragResolution, | 66 DelayedSelectionDragResolution, |
| 68 }; | 67 }; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 90 DragOperation dragOperation(DragData*); | 89 DragOperation dragOperation(DragData*); |
| 91 void cancelDrag(); | 90 void cancelDrag(); |
| 92 bool dragIsMove(FrameSelection&, DragData*); | 91 bool dragIsMove(FrameSelection&, DragData*); |
| 93 bool isCopyKeyDown(DragData*); | 92 bool isCopyKeyDown(DragData*); |
| 94 | 93 |
| 95 void mouseMovedIntoDocument(Document*); | 94 void mouseMovedIntoDocument(Document*); |
| 96 | 95 |
| 97 void doSystemDrag(DragImage*, const IntPoint& dragLocation, const IntPoint&
dragOrigin, DataTransfer*, LocalFrame*, bool forLink); | 96 void doSystemDrag(DragImage*, const IntPoint& dragLocation, const IntPoint&
dragOrigin, DataTransfer*, LocalFrame*, bool forLink); |
| 98 void cleanupAfterSystemDrag(); | 97 void cleanupAfterSystemDrag(); |
| 99 | 98 |
| 100 RawPtrWillBeMember<Page> m_page; | 99 Member<Page> m_page; |
| 101 DragClient* m_client; | 100 DragClient* m_client; |
| 102 | 101 |
| 103 RefPtrWillBeMember<Document> m_documentUnderMouse; // The document the mouse
was last dragged over. | 102 Member<Document> m_documentUnderMouse; // The document the mouse was last dr
agged over. |
| 104 RefPtrWillBeMember<Document> m_dragInitiator; // The Document (if any) that
initiated the drag. | 103 Member<Document> m_dragInitiator; // The Document (if any) that initiated th
e drag. |
| 105 RefPtrWillBeMember<HTMLInputElement> m_fileInputElementUnderMouse; | 104 Member<HTMLInputElement> m_fileInputElementUnderMouse; |
| 106 bool m_documentIsHandlingDrag; | 105 bool m_documentIsHandlingDrag; |
| 107 | 106 |
| 108 DragDestinationAction m_dragDestinationAction; | 107 DragDestinationAction m_dragDestinationAction; |
| 109 bool m_didInitiateDrag; | 108 bool m_didInitiateDrag; |
| 110 }; | 109 }; |
| 111 | 110 |
| 112 } // namespace blink | 111 } // namespace blink |
| 113 | 112 |
| 114 #endif // DragController_h | 113 #endif // DragController_h |
| OLD | NEW |