summaryrefslogtreecommitdiffstats
path: root/base/base_drop_target.cc
diff options
context:
space:
mode:
authorjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-15 18:49:58 +0000
committerjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-15 18:49:58 +0000
commit6aa4a1c041ca9bd2c3087c3c059a87193b1a82e1 (patch)
tree8e833c393312e866250077c15bc1d90464fe99d7 /base/base_drop_target.cc
parent963dfb5a05c5b0e3fa8ed74d803f01cb10fd455e (diff)
downloadchromium_src-6aa4a1c041ca9bd2c3087c3c059a87193b1a82e1.zip
chromium_src-6aa4a1c041ca9bd2c3087c3c059a87193b1a82e1.tar.gz
chromium_src-6aa4a1c041ca9bd2c3087c3c059a87193b1a82e1.tar.bz2
Support dragging a virtual file out of the browser.
BUG=none TEST=none Review URL: http://codereview.chromium.org/351029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36378 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/base_drop_target.cc')
-rw-r--r--base/base_drop_target.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/base/base_drop_target.cc b/base/base_drop_target.cc
index 77fe675..1ee878f 100644
--- a/base/base_drop_target.cc
+++ b/base/base_drop_target.cc
@@ -15,7 +15,7 @@ int32 BaseDropTarget::drag_identity_ = 0;
BaseDropTarget::BaseDropTarget(HWND hwnd)
: hwnd_(hwnd),
- suspend_(false),
+ suspended_(false),
ref_count_(0) {
DCHECK(hwnd);
HRESULT result = RegisterDragDrop(hwnd, this);
@@ -50,7 +50,7 @@ HRESULT BaseDropTarget::DragEnter(IDataObject* data_object,
}
// You can't drag and drop within the same HWND.
- if (suspend_) {
+ if (suspended_) {
*effect = DROPEFFECT_NONE;
return S_OK;
}
@@ -73,7 +73,7 @@ HRESULT BaseDropTarget::DragOver(DWORD key_state,
if (drop_helper)
drop_helper->DragOver(reinterpret_cast<POINT*>(&cursor_position), *effect);
- if (suspend_) {
+ if (suspended_) {
*effect = DROPEFFECT_NONE;
return S_OK;
}
@@ -89,6 +89,9 @@ HRESULT BaseDropTarget::DragLeave() {
if (drop_helper)
drop_helper->DragLeave();
+ if (suspended_)
+ return S_OK;
+
OnDragLeave(current_data_object_);
current_data_object_ = NULL;
@@ -106,7 +109,7 @@ HRESULT BaseDropTarget::Drop(IDataObject* data_object,
reinterpret_cast<POINT*>(&cursor_position), *effect);
}
- if (suspend_) {
+ if (suspended_) {
*effect = DROPEFFECT_NONE;
return S_OK;
}