summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webview_impl.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_impl.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_impl.h')
-rw-r--r--webkit/glue/webview_impl.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/webkit/glue/webview_impl.h b/webkit/glue/webview_impl.h
index 5b3565b..9080bf4 100644
--- a/webkit/glue/webview_impl.h
+++ b/webkit/glue/webview_impl.h
@@ -114,6 +114,7 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
const WebKit::WebPoint& client_point,
const WebKit::WebPoint& screen_point);
virtual int32 GetDragIdentity();
+ virtual bool SetDropEffect(bool accept);
virtual void AutofillSuggestionsForNode(
int64 node_id,
const std::vector<std::wstring>& suggestions,
@@ -323,6 +324,18 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
// copied from the WebDropData object sent from the browser process.
int32 drag_identity_;
+ // Valid when drag_target_dispatch_ is true. Used to override the default
+ // browser drop effect with the effects "copy" or "none".
+ enum DragTargetDropEffect {
+ DROP_EFFECT_DEFAULT = 0,
+ DROP_EFFECT_COPY,
+ DROP_EFFECT_NONE
+ } 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 autocomplete popup. Kept around and reused every-time new suggestions
// should be shown.
RefPtr<WebCore::PopupContainer> autocomplete_popup_;