Index: ui/base/dragdrop/drag_source_win.cc |
diff --git a/ui/base/dragdrop/drag_source_win.cc b/ui/base/dragdrop/drag_source_win.cc |
index 90ce68273a3379b463e1d9571d9fc73dbd26ad3f..376922a4bc2a90c78e169d40d29a2a77fd7ea71a 100644 |
--- a/ui/base/dragdrop/drag_source_win.cc |
+++ b/ui/base/dragdrop/drag_source_win.cc |
@@ -18,7 +18,7 @@ HRESULT DragSourceWin::QueryContinueDrag(BOOL escape_pressed, DWORD key_state) { |
return DRAGDROP_S_CANCEL; |
} |
- if (!(key_state & MK_LBUTTON)) { |
+ if (ShouldDropDragSource(escape_pressed, key_state)) { |
OnDragSourceDrop(); |
return DRAGDROP_S_DROP; |
} |
@@ -52,4 +52,9 @@ ULONG DragSourceWin::Release() { |
return 0; |
} |
+bool DragSourceWin::ShouldDropDragSource( |
+ BOOL escape_pressed,DWORD key_state) { |
+ return !(key_state & MK_LBUTTON); |
+} |
+ |
} // namespace ui |