| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_WIN_H_ | 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_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_WIN_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "ui/aura/client/drag_drop_client.h" | 10 #include "ui/aura/client/drag_drop_client.h" |
| 11 #include "ui/views/views_export.h" | 11 #include "ui/views/views_export.h" |
| 12 | 12 |
| 13 namespace ui { | 13 namespace ui { |
| 14 class DragSourceWin; | 14 class DragSourceWin; |
| 15 class RootWindow; | |
| 16 } | 15 } |
| 17 | 16 |
| 18 namespace views { | 17 namespace views { |
| 19 class DesktopDragDragSourceWin; | 18 class DesktopDragDragSourceWin; |
| 20 class DesktopDropTargetWin; | 19 class DesktopDropTargetWin; |
| 21 | 20 |
| 22 class VIEWS_EXPORT DesktopDragDropClientWin | 21 class VIEWS_EXPORT DesktopDragDropClientWin |
| 23 : public aura::client::DragDropClient { | 22 : public aura::client::DragDropClient { |
| 24 public: | 23 public: |
| 25 DesktopDragDropClientWin(aura::RootWindow* root_window, HWND window); | 24 DesktopDragDropClientWin(aura::Window* root_window, HWND window); |
| 26 virtual ~DesktopDragDropClientWin(); | 25 virtual ~DesktopDragDropClientWin(); |
| 27 | 26 |
| 28 // Overridden from aura::client::DragDropClient: | 27 // Overridden from aura::client::DragDropClient: |
| 29 virtual int StartDragAndDrop( | 28 virtual int StartDragAndDrop( |
| 30 const ui::OSExchangeData& data, | 29 const ui::OSExchangeData& data, |
| 31 aura::RootWindow* root_window, | 30 aura::Window* root_window, |
| 32 aura::Window* source_window, | 31 aura::Window* source_window, |
| 33 const gfx::Point& root_location, | 32 const gfx::Point& root_location, |
| 34 int operation, | 33 int operation, |
| 35 ui::DragDropTypes::DragEventSource source) OVERRIDE; | 34 ui::DragDropTypes::DragEventSource source) OVERRIDE; |
| 36 virtual void DragUpdate(aura::Window* target, | 35 virtual void DragUpdate(aura::Window* target, |
| 37 const ui::LocatedEvent& event) OVERRIDE; | 36 const ui::LocatedEvent& event) OVERRIDE; |
| 38 virtual void Drop(aura::Window* target, | 37 virtual void Drop(aura::Window* target, |
| 39 const ui::LocatedEvent& event) OVERRIDE; | 38 const ui::LocatedEvent& event) OVERRIDE; |
| 40 virtual void DragCancel() OVERRIDE; | 39 virtual void DragCancel() OVERRIDE; |
| 41 virtual bool IsDragDropInProgress() OVERRIDE; | 40 virtual bool IsDragDropInProgress() OVERRIDE; |
| 42 | 41 |
| 43 void OnNativeWidgetDestroying(HWND window); | 42 void OnNativeWidgetDestroying(HWND window); |
| 44 | 43 |
| 45 private: | 44 private: |
| 46 bool drag_drop_in_progress_; | 45 bool drag_drop_in_progress_; |
| 47 | 46 |
| 48 int drag_operation_; | 47 int drag_operation_; |
| 49 | 48 |
| 50 scoped_refptr<ui::DragSourceWin> drag_source_; | 49 scoped_refptr<ui::DragSourceWin> drag_source_; |
| 51 | 50 |
| 52 scoped_refptr<DesktopDropTargetWin> drop_target_; | 51 scoped_refptr<DesktopDropTargetWin> drop_target_; |
| 53 | 52 |
| 54 DISALLOW_COPY_AND_ASSIGN(DesktopDragDropClientWin); | 53 DISALLOW_COPY_AND_ASSIGN(DesktopDragDropClientWin); |
| 55 }; | 54 }; |
| 56 | 55 |
| 57 } // namespace views | 56 } // namespace views |
| 58 | 57 |
| 59 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_WIN_H_ | 58 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_WIN_H_ |
| OLD | NEW |