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

Unified Diff: base/base_drop_target.h

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 | « no previous file | base/base_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.h
===================================================================
--- base/base_drop_target.h (revision 10310)
+++ base/base_drop_target.h (working copy)
@@ -85,6 +85,9 @@
POINT cursor_position,
DWORD effect);
+ // Return the drag identity.
+ static int32 GetDragIdentity() { return drag_identity_; }
+
private:
// Returns the cached drop helper, creating one if necessary. The returned
// object is not addrefed. May return NULL if the object couldn't be created.
@@ -103,6 +106,14 @@
// first time it is actually used.
static IDropTargetHelper* cached_drop_target_helper_;
+ // The drag identity (id). An up-counter that increases when the cursor first
+ // moves over the HWND in a DnD session (OnDragEnter). 0 is reserved to mean
+ // the "no/unknown" identity, and is used for initialization. The identity is
+ // sent to the renderer in drag enter notifications. Note: the identity value
+ // is passed over the renderer NPAPI interface to gears, so use int32 instead
+ // of int here.
+ static int32 drag_identity_;
+
// The HWND of the source. This HWND is used to determine coordinates for
// mouse events that are sent to the renderer notifying various drag states.
HWND hwnd_;
« no previous file with comments | « no previous file | base/base_drop_target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698