diff options
author | arv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-30 16:05:08 +0000 |
---|---|---|
committer | arv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-30 16:05:08 +0000 |
commit | 6ad3865ba1984cdc267e1e98d62857673376d09b (patch) | |
tree | 646770e7e2b1e41eedac7ad228636909f61bdbcc /chrome/browser/tab_contents | |
parent | e2a9f09ae5b1abd3bc1bd929aceab28b8de09f00 (diff) | |
download | chromium_src-6ad3865ba1984cdc267e1e98d62857673376d09b.zip chromium_src-6ad3865ba1984cdc267e1e98d62857673376d09b.tar.gz chromium_src-6ad3865ba1984cdc267e1e98d62857673376d09b.tar.bz2 |
Fix for pressing escape during a drag and drop operation.
BUG=12018
Review URL: http://codereview.chromium.org/149038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19588 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/web_drag_source.cc | 8 | ||||
-rw-r--r-- | chrome/browser/tab_contents/web_drag_source.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/web_drag_source.cc b/chrome/browser/tab_contents/web_drag_source.cc index 888cc08..d85df62 100644 --- a/chrome/browser/tab_contents/web_drag_source.cc +++ b/chrome/browser/tab_contents/web_drag_source.cc @@ -39,6 +39,14 @@ WebDragSource::WebDragSource(gfx::NativeWindow source_wnd, render_view_host_(render_view_host) { } +void WebDragSource::OnDragSourceCancel() { + gfx::Point client; + gfx::Point screen; + GetCursorPositions(source_wnd_, &client, &screen); + render_view_host_->DragSourceEndedAt(client.x(), client.y(), + screen.x(), screen.y()); +} + void WebDragSource::OnDragSourceDrop() { gfx::Point client; gfx::Point screen; diff --git a/chrome/browser/tab_contents/web_drag_source.h b/chrome/browser/tab_contents/web_drag_source.h index 9ba5bf9..d1cd6e0 100644 --- a/chrome/browser/tab_contents/web_drag_source.h +++ b/chrome/browser/tab_contents/web_drag_source.h @@ -35,6 +35,7 @@ class WebDragSource : public BaseDragSource { protected: // BaseDragSource + virtual void OnDragSourceCancel(); virtual void OnDragSourceDrop(); virtual void OnDragSourceMove(); |