summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/tab_contents/web_drag_source.cc8
-rw-r--r--chrome/browser/tab_contents/web_drag_source.h1
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();