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_AURA_CLIENT_DRAG_DROP_CLIENT_H_ | 5 #ifndef UI_AURA_CLIENT_DRAG_DROP_CLIENT_H_ |
6 #define UI_AURA_CLIENT_DRAG_DROP_CLIENT_H_ | 6 #define UI_AURA_CLIENT_DRAG_DROP_CLIENT_H_ |
7 | 7 |
8 #include "ui/aura/aura_export.h" | 8 #include "ui/aura/aura_export.h" |
9 #include "ui/aura/event.h" | 9 #include "ui/aura/event.h" |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 virtual void DragUpdate(aura::Window* target, const LocatedEvent& event) = 0; | 33 virtual void DragUpdate(aura::Window* target, const LocatedEvent& event) = 0; |
34 | 34 |
35 // Called when mouse is released during a drag and drop. | 35 // Called when mouse is released during a drag and drop. |
36 virtual void Drop(aura::Window* target, const LocatedEvent& event) = 0; | 36 virtual void Drop(aura::Window* target, const LocatedEvent& event) = 0; |
37 | 37 |
38 // Called when a drag and drop session is cancelled. | 38 // Called when a drag and drop session is cancelled. |
39 virtual void DragCancel() = 0; | 39 virtual void DragCancel() = 0; |
40 | 40 |
41 // Returns true if a drag and drop session is in progress. | 41 // Returns true if a drag and drop session is in progress. |
42 virtual bool IsDragDropInProgress() = 0; | 42 virtual bool IsDragDropInProgress() = 0; |
| 43 |
| 44 // Returns the current cursor according to the appropriate drag effect. This |
| 45 // should only be called if IsDragDropInProgress() returns true. If it is |
| 46 // called otherwise, the returned cursor is arbitrary. |
| 47 virtual gfx::NativeCursor GetDragCursor() = 0; |
43 }; | 48 }; |
44 | 49 |
45 AURA_EXPORT void SetDragDropClient(RootWindow* root_window, | 50 AURA_EXPORT void SetDragDropClient(RootWindow* root_window, |
46 DragDropClient* client); | 51 DragDropClient* client); |
47 AURA_EXPORT DragDropClient* GetDragDropClient(RootWindow* root_window); | 52 AURA_EXPORT DragDropClient* GetDragDropClient(RootWindow* root_window); |
48 | 53 |
49 } // namespace client | 54 } // namespace client |
50 } // namespace aura | 55 } // namespace aura |
51 | 56 |
52 #endif // UI_AURA_CLIENT_DRAG_DROP_CLIENT_H_ | 57 #endif // UI_AURA_CLIENT_DRAG_DROP_CLIENT_H_ |
OLD | NEW |