| 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 ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_ | 5 #ifndef ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_ |
| 6 #define ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_ | 6 #define ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "ui/aura/client/drag_drop_client.h" | 11 #include "ui/aura/client/drag_drop_client.h" |
| 12 #include "ui/aura/window_observer.h" | 12 #include "ui/aura/window_observer.h" |
| 13 #include "ui/base/dragdrop/os_exchange_data.h" | 13 #include "ui/base/dragdrop/os_exchange_data.h" |
| 14 #include "ui/events/event_constants.h" | 14 #include "ui/events/event_constants.h" |
| 15 #include "ui/events/event_handler.h" | 15 #include "ui/events/event_handler.h" |
| 16 #include "ui/gfx/animation/animation_delegate.h" | 16 #include "ui/gfx/animation/animation_delegate.h" |
| 17 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
| 18 | 18 |
| 19 namespace aura { | |
| 20 class RootWindow; | |
| 21 class Window; | |
| 22 } | |
| 23 | |
| 24 namespace gfx { | 19 namespace gfx { |
| 25 class LinearAnimation; | 20 class LinearAnimation; |
| 26 } | 21 } |
| 27 | 22 |
| 28 namespace ash { | 23 namespace ash { |
| 29 | 24 |
| 30 namespace test { | 25 namespace test { |
| 31 class DragDropControllerTest; | 26 class DragDropControllerTest; |
| 32 } | 27 } |
| 33 | 28 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 46 DragDropController(); | 41 DragDropController(); |
| 47 virtual ~DragDropController(); | 42 virtual ~DragDropController(); |
| 48 | 43 |
| 49 void set_should_block_during_drag_drop(bool should_block_during_drag_drop) { | 44 void set_should_block_during_drag_drop(bool should_block_during_drag_drop) { |
| 50 should_block_during_drag_drop_ = should_block_during_drag_drop; | 45 should_block_during_drag_drop_ = should_block_during_drag_drop; |
| 51 } | 46 } |
| 52 | 47 |
| 53 // Overridden from aura::client::DragDropClient: | 48 // Overridden from aura::client::DragDropClient: |
| 54 virtual int StartDragAndDrop( | 49 virtual int StartDragAndDrop( |
| 55 const ui::OSExchangeData& data, | 50 const ui::OSExchangeData& data, |
| 56 aura::RootWindow* root_window, | 51 aura::Window* root_window, |
| 57 aura::Window* source_window, | 52 aura::Window* source_window, |
| 58 const gfx::Point& root_location, | 53 const gfx::Point& root_location, |
| 59 int operation, | 54 int operation, |
| 60 ui::DragDropTypes::DragEventSource source) OVERRIDE; | 55 ui::DragDropTypes::DragEventSource source) OVERRIDE; |
| 61 virtual void DragUpdate(aura::Window* target, | 56 virtual void DragUpdate(aura::Window* target, |
| 62 const ui::LocatedEvent& event) OVERRIDE; | 57 const ui::LocatedEvent& event) OVERRIDE; |
| 63 virtual void Drop(aura::Window* target, | 58 virtual void Drop(aura::Window* target, |
| 64 const ui::LocatedEvent& event) OVERRIDE; | 59 const ui::LocatedEvent& event) OVERRIDE; |
| 65 virtual void DragCancel() OVERRIDE; | 60 virtual void DragCancel() OVERRIDE; |
| 66 virtual bool IsDragDropInProgress() OVERRIDE; | 61 virtual bool IsDragDropInProgress() OVERRIDE; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 133 |
| 139 base::WeakPtrFactory<DragDropController> weak_factory_; | 134 base::WeakPtrFactory<DragDropController> weak_factory_; |
| 140 | 135 |
| 141 DISALLOW_COPY_AND_ASSIGN(DragDropController); | 136 DISALLOW_COPY_AND_ASSIGN(DragDropController); |
| 142 }; | 137 }; |
| 143 | 138 |
| 144 } // namespace internal | 139 } // namespace internal |
| 145 } // namespace ash | 140 } // namespace ash |
| 146 | 141 |
| 147 #endif // ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_ | 142 #endif // ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_ |
| OLD | NEW |