summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webview.h
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-22 00:12:15 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-22 00:12:15 +0000
commit124825ede0f1ff53db9ca2255142c4fcec1ad5ca (patch)
treea6182880b9caba34bf738bee043c109ba16838a7 /webkit/glue/webview.h
parent478ff2ed6a244658c0a30d6cbfff1a9046b9ba9d (diff)
downloadchromium_src-124825ede0f1ff53db9ca2255142c4fcec1ad5ca.zip
chromium_src-124825ede0f1ff53db9ca2255142c4fcec1ad5ca.tar.gz
chromium_src-124825ede0f1ff53db9ca2255142c4fcec1ad5ca.tar.bz2
Provide an override for Webview drop effect.
Used for gears file drag & drop in chrome, provide a setter api to override the default webview drop effect. If gears overrides the drop_effect, then either a "copy" or "none" cursor is shown to the user. Otherwise, the drop effect shown is the default for the webview (controlled by WebKit). Also remove a TODO: during drag and drop, remember the drop accept state of the webview (in drag enter, drag over). Use that to prevent drops on webviews that can't accept the drop data. BUG=7995 Original patch from Noel Gordon via http://codereview.chromium.org/67297 Review URL: http://codereview.chromium.org/88073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14162 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webview.h')
-rw-r--r--webkit/glue/webview.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/webkit/glue/webview.h b/webkit/glue/webview.h
index 8f39bd31..600338f 100644
--- a/webkit/glue/webview.h
+++ b/webkit/glue/webview.h
@@ -191,8 +191,8 @@ class WebView : public WebWidget {
// Notfies the webview that the system drag and drop operation has ended.
virtual void DragSourceSystemDragEnded() = 0;
- // Callback methods when a drag and drop operation is trying to drop
- // something on the renderer.
+ // Callback methods when a drag and drop operation is trying to drop data
+ // on this webview.
virtual bool DragTargetDragEnter(
const WebKit::WebDragData& drag_data, int identity,
const WebKit::WebPoint& client_point,
@@ -204,8 +204,16 @@ class WebView : public WebWidget {
virtual void DragTargetDrop(
const WebKit::WebPoint& client_point,
const WebKit::WebPoint& screen_point) = 0;
+
+ // Helper method for drag and drop target operations: return the drag data
+ // identity.
virtual int32 GetDragIdentity() = 0;
+ // Helper method for drag and drop target operations: override the default
+ // drop effect with either a "copy" (accept true) or "none" (accept false)
+ // effect. Return true on success.
+ virtual bool SetDropEffect(bool accept) = 0;
+
// Notifies the webview that autofill suggestions are available for a node.
virtual void AutofillSuggestionsForNode(
int64 node_id,