Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ui / views / widget / desktop_aura / desktop_drag_drop_client_win.h
bloba8051ca8693b461f957bf760a2f3d953e9e7d450
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"
13 namespace ui {
14 class DragSourceWin;
17 namespace views {
18 class DesktopDropTargetWin;
20 class VIEWS_EXPORT DesktopDragDropClientWin
21 : public aura::client::DragDropClient {
22 public:
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,
32 int operation,
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);
43 private:
44 bool drag_drop_in_progress_;
46 int drag_operation_;
48 scoped_refptr<ui::DragSourceWin> drag_source_;
50 scoped_refptr<DesktopDropTargetWin> drop_target_;
52 DISALLOW_COPY_AND_ASSIGN(DesktopDragDropClientWin);
55 } // namespace views
57 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_WIN_H_