| Index: third_party/WebKit/Source/web/WebFrameWidgetBase.h
|
| diff --git a/third_party/WebKit/Source/web/WebFrameWidgetBase.h b/third_party/WebKit/Source/web/WebFrameWidgetBase.h
|
| index 69698fe7a8d59471c92c6fe016bf8e5408714c0b..9ac911003f6b36d6e6adf2cfae3fccbce523b58a 100644
|
| --- a/third_party/WebKit/Source/web/WebFrameWidgetBase.h
|
| +++ b/third_party/WebKit/Source/web/WebFrameWidgetBase.h
|
| @@ -5,6 +5,8 @@
|
| #ifndef WebFrameWidgetBase_h
|
| #define WebFrameWidgetBase_h
|
|
|
| +#include "core/clipboard/DataObject.h"
|
| +#include "public/platform/WebDragData.h"
|
| #include "public/web/WebFrameWidget.h"
|
| #include "wtf/Assertions.h"
|
|
|
| @@ -12,8 +14,11 @@ namespace blink {
|
|
|
| class CompositorAnimationTimeline;
|
| class CompositorProxyClient;
|
| +class DragController;
|
| class GraphicsLayer;
|
| class WebLayer;
|
| +class WebLocalFrameImpl;
|
| +class WebViewImpl;
|
| class HitTestResult;
|
| struct WebPoint;
|
|
|
| @@ -38,6 +43,55 @@ class WebFrameWidgetBase : public WebFrameWidget {
|
| CompositorAnimationTimeline*) = 0;
|
|
|
| virtual HitTestResult coreHitTestResultAt(const WebPoint&) = 0;
|
| +
|
| + // WebFrameWidget implementation.
|
| + WebDragOperation dragTargetDragEnter(const WebDragData&,
|
| + const WebPoint& pointInViewport,
|
| + const WebPoint& screenPoint,
|
| + WebDragOperationsMask operationsAllowed,
|
| + int modifiers) override;
|
| + WebDragOperation dragTargetDragOver(const WebPoint& pointInViewport,
|
| + const WebPoint& screenPoint,
|
| + WebDragOperationsMask operationsAllowed,
|
| + int modifiers) override;
|
| + void dragTargetDragLeave() override;
|
| + void dragTargetDrop(const WebDragData&,
|
| + const WebPoint& pointInViewport,
|
| + const WebPoint& screenPoint,
|
| + int modifiers) override;
|
| +
|
| + protected:
|
| + enum DragAction { DragEnter, DragOver };
|
| +
|
| + // Consolidate some common code between starting a drag over a target and
|
| + // updating a drag over a target. If we're starting a drag, |isEntering|
|
| + // should be true.
|
| + WebDragOperation dragTargetDragEnterOrOver(const WebPoint& pointInViewport,
|
| + const WebPoint& screenPoint,
|
| + DragAction,
|
| + int modifiers);
|
| +
|
| + // Helper function to call VisualViewport::viewportToRootFrame().
|
| + WebPoint viewportToRootFrame(const WebPoint& pointInViewport) const;
|
| +
|
| + WebViewImpl* view() const;
|
| +
|
| + // Returns the page object associated with this widget. This may be null when
|
| + // the page is shutting down, but will be valid at all other times.
|
| + Page* page() const;
|
| +
|
| + // A copy of the web drop data object we received from the browser.
|
| + Persistent<DataObject> m_currentDragData;
|
| +
|
| + bool m_doingDragAndDrop = false;
|
| +
|
| + // The available drag operations (copy, move link...) allowed by the source.
|
| + WebDragOperation m_operationsAllowed = WebDragOperationNone;
|
| +
|
| + // The current drag operation as negotiated by the source and destination.
|
| + // When not equal to DragOperationNone, the drag data can be dropped onto the
|
| + // current drop target in this WebView (the drop target can accept the drop).
|
| + WebDragOperation m_dragOperation = WebDragOperationNone;
|
| };
|
|
|
| DEFINE_TYPE_CASTS(WebFrameWidgetBase, WebFrameWidget, widget, true, true);
|
|
|