summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webview_impl.h
diff options
context:
space:
mode:
authorsnej@chromium.org <snej@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-08 17:29:25 +0000
committersnej@chromium.org <snej@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-08 17:29:25 +0000
commit1d9f4137eff50f1305e288767bb770151526552d (patch)
tree4ae1750d34778e7b0ae23dfe315118cf124c3715 /webkit/glue/webview_impl.h
parentc7f475ed4a9fd8f198468df696c55e1c75d65526 (diff)
downloadchromium_src-1d9f4137eff50f1305e288767bb770151526552d.zip
chromium_src-1d9f4137eff50f1305e288767bb770151526552d.tar.gz
chromium_src-1d9f4137eff50f1305e288767bb770151526552d.tar.bz2
Plumb the DragOperation through all the layers between the platform Drag-n-drop code and WebCore.
This allows the HTML5 DataTransfer effectAllowed and dropEffect properties to be set correctly in JS handlers, as per the HTML5 spec. (The drag-dropeffect test isn't in WebKit yet -- it's part of a separate WebKit patch that's been in review for weeks.) R=darin,pink BUG=http://code.google.com/p/chromium/issues/detail?id=14654, http://code.google.com/p/chromium/issues/detail?id=20985 TEST=LayoutTests/fast/events/drag-dropeffect.html, LayoutTests/editing/pasteboard/files-during-page-drags.html Review URL: http://codereview.chromium.org/174364 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25629 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webview_impl.h')
-rw-r--r--webkit/glue/webview_impl.h30
1 files changed, 18 insertions, 12 deletions
diff --git a/webkit/glue/webview_impl.h b/webkit/glue/webview_impl.h
index 2504c1e..3c753ac 100644
--- a/webkit/glue/webview_impl.h
+++ b/webkit/glue/webview_impl.h
@@ -111,23 +111,23 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
virtual void CopyImageAt(int x, int y);
virtual void InspectElement(int x, int y);
virtual void ShowJavaScriptConsole();
- virtual void DragSourceCancelledAt(
- const WebKit::WebPoint& client_point,
- const WebKit::WebPoint& screen_point);
virtual void DragSourceEndedAt(
const WebKit::WebPoint& client_point,
- const WebKit::WebPoint& screen_point);
+ const WebKit::WebPoint& screen_point,
+ WebKit::WebDragOperation operation);
virtual void DragSourceMovedTo(
const WebKit::WebPoint& client_point,
const WebKit::WebPoint& screen_point);
virtual void DragSourceSystemDragEnded();
- virtual bool DragTargetDragEnter(
+ virtual WebKit::WebDragOperation DragTargetDragEnter(
const WebKit::WebDragData& drag_data, int identity,
const WebKit::WebPoint& client_point,
- const WebKit::WebPoint& screen_point);
- virtual bool DragTargetDragOver(
+ const WebKit::WebPoint& screen_point,
+ WebKit::WebDragOperationsMask operations_allowed);
+ virtual WebKit::WebDragOperation DragTargetDragOver(
const WebKit::WebPoint& client_point,
- const WebKit::WebPoint& screen_point);
+ const WebKit::WebPoint& screen_point,
+ WebKit::WebDragOperationsMask operations_allowed);
virtual void DragTargetDragLeave();
virtual void DragTargetDrop(
const WebKit::WebPoint& client_point,
@@ -231,7 +231,9 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
}
// Start a system drag and drop operation.
- void StartDragging(const WebKit::WebDragData& drag_data);
+ void StartDragging(WebKit::WebPoint event_pos,
+ const WebKit::WebDragData& drag_data,
+ WebKit::WebDragOperationsMask drag_source_operation_mask);
// Hides the autocomplete popup if it is showing.
void HideAutoCompletePopup();
@@ -369,9 +371,13 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
DROP_EFFECT_COPY
} drop_effect_;
- // When true, the drag data can be dropped onto the current drop target in
- // this WebView (the drop target can accept the drop).
- bool drop_accept_;
+ // The available drag operations (copy, move link...) allowed by the source.
+ WebKit::WebDragOperation operations_allowed_;
+
+ // 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).
+ WebKit::WebDragOperation drag_operation_;
// The autocomplete popup. Kept around and reused every-time new suggestions
// should be shown.