Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(823)

Side by Side Diff: third_party/WebKit/Source/core/page/DragController.h

Issue 2517653003: Drag-and-drop across OOPIFs. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/page/DragController.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class Page; 49 class Page;
50 class PlatformMouseEvent; 50 class PlatformMouseEvent;
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*); 59 DragSession dragEnteredOrUpdated(DragData*, LocalFrame& localRoot);
60 void dragExited(DragData*); 60 void dragExited(DragData*, LocalFrame& localRoot);
61 bool performDrag(DragData*); 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 PlatformMouseEvent& 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*); 88 bool canProcessDrag(DragData*, LocalFrame& localRoot);
89 bool concludeEditDrag(DragData*); 89 bool concludeEditDrag(DragData*);
90 DragOperation operationForLoad(DragData*); 90 DragOperation operationForLoad(DragData*, LocalFrame& localRoot);
91 bool tryDocumentDrag(DragData*, DragDestinationAction, DragSession&); 91 bool tryDocumentDrag(DragData*,
92 bool tryDHTMLDrag(DragData*, DragOperation&); 92 DragDestinationAction,
93 DragSession&,
94 LocalFrame& localRoot);
95 bool tryDHTMLDrag(DragData*, DragOperation&, LocalFrame& localRoot);
93 DragOperation dragOperation(DragData*); 96 DragOperation dragOperation(DragData*);
94 void cancelDrag(); 97 void cancelDrag();
95 bool dragIsMove(FrameSelection&, DragData*); 98 bool dragIsMove(FrameSelection&, DragData*);
96 bool isCopyKeyDown(DragData*); 99 bool isCopyKeyDown(DragData*);
97 100
98 void mouseMovedIntoDocument(Document*); 101 void mouseMovedIntoDocument(Document*);
99 102
100 void doSystemDrag(DragImage*, 103 void doSystemDrag(DragImage*,
101 const IntPoint& dragLocation, 104 const IntPoint& dragLocation,
102 const IntPoint& dragOrigin, 105 const IntPoint& dragOrigin,
(...skipping 11 matching lines...) Expand all
114 Member<HTMLInputElement> m_fileInputElementUnderMouse; 117 Member<HTMLInputElement> m_fileInputElementUnderMouse;
115 bool m_documentIsHandlingDrag; 118 bool m_documentIsHandlingDrag;
116 119
117 DragDestinationAction m_dragDestinationAction; 120 DragDestinationAction m_dragDestinationAction;
118 bool m_didInitiateDrag; 121 bool m_didInitiateDrag;
119 }; 122 };
120 123
121 } // namespace blink 124 } // namespace blink
122 125
123 #endif // DragController_h 126 #endif // DragController_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/page/DragController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698