summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-26 01:27:55 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-26 01:27:55 +0000
commit58377e2edb08dabeeba8a01bfb4484eb61527b4a (patch)
tree25fe434821c4537d799a316c91a995394ec00efb /chrome/browser
parent24c289f856db14a85e5840ad0132512ef59c5c5f (diff)
downloadchromium_src-58377e2edb08dabeeba8a01bfb4484eb61527b4a.zip
chromium_src-58377e2edb08dabeeba8a01bfb4484eb61527b4a.tar.gz
chromium_src-58377e2edb08dabeeba8a01bfb4484eb61527b4a.tar.bz2
Add an identity (id) to system drag & drop.
Used for gears file drag & drop in chrome, assign a drag id (identity) to each drag and drop session. Send the identity to the renderer WebViewImpl in drag enter notifications, provide a getter method. BUG=7995 Original patch by noel.gordon@gmail.com in: http://codereview.chromium.org/28108/show Review URL: http://codereview.chromium.org/28158 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10430 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/tab_contents/web_drop_target.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/web_drop_target.cc b/chrome/browser/tab_contents/web_drop_target.cc
index 90ac002..eb740ee 100644
--- a/chrome/browser/tab_contents/web_drop_target.cc
+++ b/chrome/browser/tab_contents/web_drop_target.cc
@@ -100,7 +100,7 @@ DWORD WebDropTarget::OnDragEnter(IDataObject* data_object,
// TODO(tc): PopulateWebDropData can be slow depending on what is in the
// IDataObject. Maybe we can do this in a background thread.
- WebDropData drop_data;
+ WebDropData drop_data(GetDragIdentity());
WebDropData::PopulateWebDropData(data_object, &drop_data);
if (drop_data.url.is_empty())
@@ -136,6 +136,12 @@ DWORD WebDropTarget::OnDragOver(IDataObject* data_object,
gfx::Point(client_pt.x, client_pt.y),
gfx::Point(cursor_position.x, cursor_position.y));
+ // Again we don't wait on the renderer to respond, but this can lead to
+ // a race condition. If the renderer does not want the drop data, then
+ // we won't know until the response from the renderer arrives. So if a
+ // drop happens before the response arrives, we drop on a renderer that
+ // doesn't want the data. TODO(noel): fix this.
+
if (!is_drop_target_)
return DROPEFFECT_NONE;