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 "ui/aura/client/drag_drop_client.h" | 10 #include "ui/aura/client/drag_drop_client.h" |
11 #include "ui/aura/event.h" | |
12 #include "ui/aura/event_filter.h" | 11 #include "ui/aura/event_filter.h" |
13 #include "ui/aura/window_observer.h" | 12 #include "ui/aura/window_observer.h" |
14 #include "ui/base/dragdrop/os_exchange_data.h" | 13 #include "ui/base/dragdrop/os_exchange_data.h" |
15 #include "ui/base/events.h" | 14 #include "ui/base/events.h" |
16 #include "ui/compositor/layer_animation_observer.h" | 15 #include "ui/compositor/layer_animation_observer.h" |
17 #include "ui/gfx/point.h" | 16 #include "ui/gfx/point.h" |
18 | 17 |
19 namespace aura { | 18 namespace aura { |
20 class Window; | 19 class Window; |
21 } | 20 } |
(...skipping 23 matching lines...) Expand all Loading... |
45 | 44 |
46 void set_should_block_during_drag_drop(bool should_block_during_drag_drop) { | 45 void set_should_block_during_drag_drop(bool should_block_during_drag_drop) { |
47 should_block_during_drag_drop_ = should_block_during_drag_drop; | 46 should_block_during_drag_drop_ = should_block_during_drag_drop; |
48 } | 47 } |
49 | 48 |
50 // Overridden from aura::client::DragDropClient: | 49 // Overridden from aura::client::DragDropClient: |
51 virtual int StartDragAndDrop(const ui::OSExchangeData& data, | 50 virtual int StartDragAndDrop(const ui::OSExchangeData& data, |
52 const gfx::Point& root_location, | 51 const gfx::Point& root_location, |
53 int operation) OVERRIDE; | 52 int operation) OVERRIDE; |
54 virtual void DragUpdate(aura::Window* target, | 53 virtual void DragUpdate(aura::Window* target, |
55 const aura::LocatedEvent& event) OVERRIDE; | 54 const ui::LocatedEvent& event) OVERRIDE; |
56 virtual void Drop(aura::Window* target, | 55 virtual void Drop(aura::Window* target, |
57 const aura::LocatedEvent& event) OVERRIDE; | 56 const ui::LocatedEvent& event) OVERRIDE; |
58 virtual void DragCancel() OVERRIDE; | 57 virtual void DragCancel() OVERRIDE; |
59 virtual bool IsDragDropInProgress() OVERRIDE; | 58 virtual bool IsDragDropInProgress() OVERRIDE; |
60 virtual gfx::NativeCursor GetDragCursor() OVERRIDE; | 59 virtual gfx::NativeCursor GetDragCursor() OVERRIDE; |
61 | 60 |
62 // Overridden from aura::EventFilter: | 61 // Overridden from aura::EventFilter: |
63 virtual bool PreHandleKeyEvent(aura::Window* target, | 62 virtual bool PreHandleKeyEvent(aura::Window* target, |
64 aura::KeyEvent* event) OVERRIDE; | 63 ui::KeyEvent* event) OVERRIDE; |
65 virtual bool PreHandleMouseEvent(aura::Window* target, | 64 virtual bool PreHandleMouseEvent(aura::Window* target, |
66 aura::MouseEvent* event) OVERRIDE; | 65 ui::MouseEvent* event) OVERRIDE; |
67 virtual ui::TouchStatus PreHandleTouchEvent(aura::Window* target, | 66 virtual ui::TouchStatus PreHandleTouchEvent( |
68 aura::TouchEvent* event) OVERRIDE; | 67 aura::Window* target, |
| 68 ui::TouchEventImpl* event) OVERRIDE; |
69 virtual ui::GestureStatus PreHandleGestureEvent( | 69 virtual ui::GestureStatus PreHandleGestureEvent( |
70 aura::Window* target, | 70 aura::Window* target, |
71 aura::GestureEvent* event) OVERRIDE; | 71 ui::GestureEventImpl* event) OVERRIDE; |
72 | 72 |
73 // Overridden from aura::WindowObserver. | 73 // Overridden from aura::WindowObserver. |
74 virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE; | 74 virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE; |
75 | 75 |
76 private: | 76 private: |
77 friend class ash::test::DragDropControllerTest; | 77 friend class ash::test::DragDropControllerTest; |
78 | 78 |
79 // Implementation of ImplicitAnimationObserver | 79 // Implementation of ImplicitAnimationObserver |
80 virtual void OnImplicitAnimationsCompleted() OVERRIDE; | 80 virtual void OnImplicitAnimationsCompleted() OVERRIDE; |
81 | 81 |
(...skipping 22 matching lines...) Expand all Loading... |
104 // Closure for quitting nested message loop. | 104 // Closure for quitting nested message loop. |
105 base::Closure quit_closure_; | 105 base::Closure quit_closure_; |
106 | 106 |
107 DISALLOW_COPY_AND_ASSIGN(DragDropController); | 107 DISALLOW_COPY_AND_ASSIGN(DragDropController); |
108 }; | 108 }; |
109 | 109 |
110 } // namespace internal | 110 } // namespace internal |
111 } // namespace ash | 111 } // namespace ash |
112 | 112 |
113 #endif // ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_ | 113 #endif // ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_ |
OLD | NEW |