summaryrefslogtreecommitdiffstats
path: root/base/base_drop_target.h
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 /base/base_drop_target.h
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 'base/base_drop_target.h')
-rw-r--r--base/base_drop_target.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/base/base_drop_target.h b/base/base_drop_target.h
index 9f20752..cf63be28 100644
--- a/base/base_drop_target.h
+++ b/base/base_drop_target.h
@@ -85,6 +85,9 @@ class BaseDropTarget : public IDropTarget {
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 @@ class BaseDropTarget : public IDropTarget {
// 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_;