1 // Copyright (c) 2012 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 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_WIN_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_WIN_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h"
10 #include "ui/views/views_export.h"
11 #include "ui/wm/public/drag_drop_client.h"
18 class DesktopDropTargetWin
;
20 class VIEWS_EXPORT DesktopDragDropClientWin
21 : public aura::client::DragDropClient
{
23 DesktopDragDropClientWin(aura::Window
* root_window
, HWND window
);
24 virtual ~DesktopDragDropClientWin();
26 // Overridden from aura::client::DragDropClient:
27 virtual int StartDragAndDrop(
28 const ui::OSExchangeData
& data
,
29 aura::Window
* root_window
,
30 aura::Window
* source_window
,
31 const gfx::Point
& root_location
,
33 ui::DragDropTypes::DragEventSource source
) OVERRIDE
;
34 virtual void DragUpdate(aura::Window
* target
,
35 const ui::LocatedEvent
& event
) OVERRIDE
;
36 virtual void Drop(aura::Window
* target
,
37 const ui::LocatedEvent
& event
) OVERRIDE
;
38 virtual void DragCancel() OVERRIDE
;
39 virtual bool IsDragDropInProgress() OVERRIDE
;
41 void OnNativeWidgetDestroying(HWND window
);
44 bool drag_drop_in_progress_
;
48 scoped_refptr
<ui::DragSourceWin
> drag_source_
;
50 scoped_refptr
<DesktopDropTargetWin
> drop_target_
;
52 DISALLOW_COPY_AND_ASSIGN(DesktopDragDropClientWin
);
57 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_WIN_H_