1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/base/dragdrop/drag_source_win.h"
7 #include "ui/base/dragdrop/os_exchange_data_provider_win.h"
11 DragSourceWin::DragSourceWin() : cancel_drag_(false), data_(nullptr) {
14 HRESULT
DragSourceWin::QueryContinueDrag(BOOL escape_pressed
, DWORD key_state
) {
16 return DRAGDROP_S_CANCEL
;
20 return DRAGDROP_S_CANCEL
;
23 if (!(key_state
& MK_LBUTTON
)) {
25 return DRAGDROP_S_DROP
;
32 HRESULT
DragSourceWin::GiveFeedback(DWORD effect
) {
33 return DRAGDROP_S_USEDEFAULTCURSORS
;
36 void DragSourceWin::OnDragSourceDrop() {
38 ui::OSExchangeDataProviderWin::GetDataObjectImpl(*data_
)
39 ->set_in_drag_loop(false);