diff options
author | snej@chromium.org <snej@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-08 17:29:25 +0000 |
---|---|---|
committer | snej@chromium.org <snej@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-08 17:29:25 +0000 |
commit | 1d9f4137eff50f1305e288767bb770151526552d (patch) | |
tree | 4ae1750d34778e7b0ae23dfe315118cf124c3715 /webkit/glue/webview.h | |
parent | c7f475ed4a9fd8f198468df696c55e1c75d65526 (diff) | |
download | chromium_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.h')
-rw-r--r-- | webkit/glue/webview.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/webkit/glue/webview.h b/webkit/glue/webview.h index 0b55232..0cd33fc 100644 --- a/webkit/glue/webview.h +++ b/webkit/glue/webview.h @@ -9,6 +9,7 @@ #include <vector> #include "base/basictypes.h" +#include "webkit/api/public/WebDragOperation.h" #include "webkit/api/public/WebWidget.h" namespace WebKit { @@ -185,15 +186,11 @@ class WebView : public WebKit::WebWidget { // Show the JavaScript console. virtual void ShowJavaScriptConsole() = 0; - // Notifies the webview that a drag has been cancelled. - virtual void DragSourceCancelledAt( - const WebKit::WebPoint& client_point, - const WebKit::WebPoint& screen_point) = 0; - - // Notifies the webview that a drag has terminated. + // Notifies the webview that a drag has ended (with a drop or a cancel). virtual void DragSourceEndedAt( const WebKit::WebPoint& client_point, - const WebKit::WebPoint& screen_point) = 0; + const WebKit::WebPoint& screen_point, + WebKit::WebDragOperation operation) = 0; // Notifies the webview that a drag and drop operation is in progress, with // dropable items over the view. @@ -206,13 +203,15 @@ class WebView : public WebKit::WebWidget { // Callback methods when a drag and drop operation is trying to drop data // on this webview. - virtual bool DragTargetDragEnter( + virtual WebKit::WebDragOperation DragTargetDragEnter( const WebKit::WebDragData& drag_data, int identity, const WebKit::WebPoint& client_point, - const WebKit::WebPoint& screen_point) = 0; - virtual bool DragTargetDragOver( + const WebKit::WebPoint& screen_point, + WebKit::WebDragOperationsMask operations_allowed) = 0; + virtual WebKit::WebDragOperation DragTargetDragOver( const WebKit::WebPoint& client_point, - const WebKit::WebPoint& screen_point) = 0; + const WebKit::WebPoint& screen_point, + WebKit::WebDragOperationsMask operations_allowed) = 0; virtual void DragTargetDragLeave() = 0; virtual void DragTargetDrop( const WebKit::WebPoint& client_point, |