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

Unified Diff: base/base_drop_target.cc

Issue 28158: Add an identity (id) to system drag & drop. (Closed)
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.h ('k') | chrome/browser/tab_contents/web_drop_target.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/base_drop_target.cc
diff --git a/base/base_drop_target.cc b/base/base_drop_target.cc
index 9809255047835b58ab0baee134793fd17bd33020..1dda3963fdc57f152f1deb92444a2df745481339 100644
--- a/base/base_drop_target.cc
+++ b/base/base_drop_target.cc
@@ -11,6 +11,7 @@
///////////////////////////////////////////////////////////////////////////////
IDropTargetHelper* BaseDropTarget::cached_drop_target_helper_ = NULL;
+int32 BaseDropTarget::drag_identity_ = 0;
BaseDropTarget::BaseDropTarget(HWND hwnd)
: hwnd_(hwnd),
@@ -53,6 +54,11 @@ HRESULT BaseDropTarget::DragEnter(IDataObject* data_object,
*effect = DROPEFFECT_NONE;
return S_OK;
}
+
+ // Update the drag identity, skipping 0.
+ if (++drag_identity_ == 0)
+ ++drag_identity_;
+
current_data_object_ = data_object;
POINT screen_pt = { cursor_position.x, cursor_position.y };
*effect = OnDragEnter(current_data_object_, key_state, screen_pt, *effect);
« no previous file with comments | « base/base_drop_target.h ('k') | chrome/browser/tab_contents/web_drop_target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698