Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(484)

Unified Diff: chrome/browser/tab_contents/web_drop_target.cc

Issue 28108: Add an identity (id) to system drag & drop. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/base_drop_target.cc ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/web_drop_target.cc
===================================================================
--- chrome/browser/tab_contents/web_drop_target.cc (revision 10310)
+++ chrome/browser/tab_contents/web_drop_target.cc (working copy)
@@ -100,7 +100,7 @@
// 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 @@
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;
« no previous file with comments | « base/base_drop_target.cc ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698