OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 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_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/ref_counted.h" |
| 10 #include "ui/aura/client/drag_drop_client.h" |
| 11 #include "ui/views/views_export.h" |
| 12 |
| 13 namespace ui { |
| 14 class DragSource; |
| 15 class RootWindow; |
| 16 } |
| 17 |
| 18 namespace views { |
| 19 class DesktopDragDragSourceWin; |
| 20 class DesktopDropTargetWin; |
| 21 |
| 22 class VIEWS_EXPORT DesktopDragDropClientWin |
| 23 : public aura::client::DragDropClient { |
| 24 public: |
| 25 DesktopDragDropClientWin(aura::RootWindow* root_window, HWND window); |
| 26 virtual ~DesktopDragDropClientWin(); |
| 27 |
| 28 // Overridden from aura::client::DragDropClient: |
| 29 virtual int StartDragAndDrop( |
| 30 const ui::OSExchangeData& data, |
| 31 aura::RootWindow* root_window, |
| 32 aura::Window* source_window, |
| 33 const gfx::Point& root_location, |
| 34 int operation, |
| 35 ui::DragDropTypes::DragEventSource source) OVERRIDE; |
| 36 virtual void DragUpdate(aura::Window* target, |
| 37 const ui::LocatedEvent& event) OVERRIDE; |
| 38 virtual void Drop(aura::Window* target, |
| 39 const ui::LocatedEvent& event) OVERRIDE; |
| 40 virtual void DragCancel() OVERRIDE; |
| 41 virtual bool IsDragDropInProgress() OVERRIDE; |
| 42 |
| 43 void OnNativeWidgetDestroying(HWND window); |
| 44 |
| 45 private: |
| 46 bool drag_drop_in_progress_; |
| 47 |
| 48 int drag_operation_; |
| 49 |
| 50 scoped_refptr<ui::DragSource> drag_source_; |
| 51 |
| 52 scoped_refptr<DesktopDropTargetWin> drop_target_; |
| 53 |
| 54 DISALLOW_COPY_AND_ASSIGN(DesktopDragDropClientWin); |
| 55 }; |
| 56 |
| 57 } // namespace views |
| 58 |
| 59 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_WIN_H_ |
OLD | NEW |