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

Side by Side Diff: third_party/WebKit/Source/web/WebFrameWidgetBase.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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebFrameWidgetBase_h 5 #ifndef WebFrameWidgetBase_h
6 #define WebFrameWidgetBase_h 6 #define WebFrameWidgetBase_h
7 7
8 #include "core/clipboard/DataObject.h" 8 #include "core/clipboard/DataObject.h"
9 #include "public/platform/WebDragData.h" 9 #include "public/platform/WebDragData.h"
10 #include "public/web/WebFrameWidget.h" 10 #include "public/web/WebFrameWidget.h"
11 #include "wtf/Assertions.h" 11 #include "wtf/Assertions.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class CompositorAnimationTimeline; 15 class CompositorAnimationTimeline;
16 class CompositorProxyClient; 16 class CompositorProxyClient;
17 class DragController; 17 class DragController;
18 class GraphicsLayer; 18 class GraphicsLayer;
19 class WebImage;
19 class WebLayer; 20 class WebLayer;
20 class WebLocalFrameImpl; 21 class WebLocalFrameImpl;
21 class WebViewImpl; 22 class WebViewImpl;
22 class HitTestResult; 23 class HitTestResult;
23 struct WebPoint; 24 struct WebPoint;
24 25
25 class WebFrameWidgetBase : public WebFrameWidget { 26 class WebFrameWidgetBase : public WebFrameWidget {
26 public: 27 public:
27 virtual bool forSubframe() const = 0; 28 virtual bool forSubframe() const = 0;
28 virtual void scheduleAnimation() = 0; 29 virtual void scheduleAnimation() = 0;
(...skipping 28 matching lines...) Expand all
57 void dragTargetDragLeave() override; 58 void dragTargetDragLeave() override;
58 void dragTargetDrop(const WebDragData&, 59 void dragTargetDrop(const WebDragData&,
59 const WebPoint& pointInViewport, 60 const WebPoint& pointInViewport,
60 const WebPoint& screenPoint, 61 const WebPoint& screenPoint,
61 int modifiers) override; 62 int modifiers) override;
62 void dragSourceEndedAt(const WebPoint& pointInViewport, 63 void dragSourceEndedAt(const WebPoint& pointInViewport,
63 const WebPoint& screenPoint, 64 const WebPoint& screenPoint,
64 WebDragOperation) override; 65 WebDragOperation) override;
65 void dragSourceSystemDragEnded() override; 66 void dragSourceSystemDragEnded() override;
66 67
68 // Called when a drag-n-drop operation should begin.
69 void startDragging(WebReferrerPolicy,
70 const WebDragData&,
71 WebDragOperationsMask,
72 const WebImage& dragImage,
73 const WebPoint& dragImageOffset);
74
75 bool doingDragAndDrop() { return m_doingDragAndDrop; }
76
67 protected: 77 protected:
68 enum DragAction { DragEnter, DragOver }; 78 enum DragAction { DragEnter, DragOver };
69 79
70 // Consolidate some common code between starting a drag over a target and 80 // Consolidate some common code between starting a drag over a target and
71 // updating a drag over a target. If we're starting a drag, |isEntering| 81 // updating a drag over a target. If we're starting a drag, |isEntering|
72 // should be true. 82 // should be true.
73 WebDragOperation dragTargetDragEnterOrOver(const WebPoint& pointInViewport, 83 WebDragOperation dragTargetDragEnterOrOver(const WebPoint& pointInViewport,
74 const WebPoint& screenPoint, 84 const WebPoint& screenPoint,
75 DragAction, 85 DragAction,
76 int modifiers); 86 int modifiers);
(...skipping 19 matching lines...) Expand all
96 // When not equal to DragOperationNone, the drag data can be dropped onto the 106 // When not equal to DragOperationNone, the drag data can be dropped onto the
97 // current drop target in this WebView (the drop target can accept the drop). 107 // current drop target in this WebView (the drop target can accept the drop).
98 WebDragOperation m_dragOperation = WebDragOperationNone; 108 WebDragOperation m_dragOperation = WebDragOperationNone;
99 }; 109 };
100 110
101 DEFINE_TYPE_CASTS(WebFrameWidgetBase, WebFrameWidget, widget, true, true); 111 DEFINE_TYPE_CASTS(WebFrameWidgetBase, WebFrameWidget, widget, true, true);
102 112
103 } // namespace blink 113 } // namespace blink
104 114
105 #endif 115 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.cpp ('k') | third_party/WebKit/Source/web/WebFrameWidgetBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698