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

Unified Diff: ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc

Issue 13523004: StartDragAndDrop should return the completed operation (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc
diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc b/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc
index 7521919abfc3c9fde14e358aec78e24a141c7f29..840e38221b4344295305214a7f6d7abf195841de 100644
--- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc
@@ -35,15 +35,19 @@ int DesktopDragDropClientWin::StartDragAndDrop(
drag_operation_ = operation;
drag_source_ = new ui::DragSourceWin;
- DWORD effects;
- DoDragDrop(ui::OSExchangeDataProviderWin::GetIDataObject(data),
- drag_source_,
- ui::DragDropTypes::DragOperationToDropEffect(operation),
- &effects);
+ DWORD effect;
+ HRESULT result = DoDragDrop(
+ ui::OSExchangeDataProviderWin::GetIDataObject(data),
+ drag_source_,
+ ui::DragDropTypes::DragOperationToDropEffect(operation),
+ &effect);
drag_drop_in_progress_ = false;
- return drag_operation_;
+ if (result != DRAGDROP_S_DROP)
+ effect = DROPEFFECT_NONE;
+
+ return ui::DragDropTypes::DropEffectToDragOperation(effect);
}
void DesktopDragDropClientWin::DragUpdate(aura::Window* target,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698