| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_DELEGATE_H_ | 5 #ifndef UI_AURA_CLIENT_DRAG_DROP_DELEGATE_H_ |
| 6 #define UI_AURA_CLIENT_DRAG_DROP_DELEGATE_H_ | 6 #define UI_AURA_CLIENT_DRAG_DROP_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ui/aura/aura_export.h" | 9 #include "ui/aura/aura_export.h" |
| 10 | 10 |
| 11 namespace aura { | 11 namespace aura { |
| 12 class DropTargetEvent; | 12 class DropTargetEvent; |
| 13 class Window; | 13 class Window; |
| 14 namespace client { | 14 namespace client { |
| 15 | 15 |
| 16 // A property key to store the drag and drop delegate for a window. The type of |
| 17 // the value is |aura::WindowDragDropDelegate*|. |
| 18 AURA_EXPORT extern const char kDragDropDelegateKey[]; |
| 19 |
| 16 // Delegate interface for drag and drop actions on aura::Window. | 20 // Delegate interface for drag and drop actions on aura::Window. |
| 17 class AURA_EXPORT DragDropDelegate { | 21 class AURA_EXPORT DragDropDelegate { |
| 18 public: | 22 public: |
| 19 // OnDragEntered is invoked when the mouse enters this window during a drag & | 23 // OnDragEntered is invoked when the mouse enters this window during a drag & |
| 20 // drop session. This is immediately followed by an invocation of | 24 // drop session. This is immediately followed by an invocation of |
| 21 // OnDragUpdated, and eventually one of OnDragExited or OnPerformDrop. | 25 // OnDragUpdated, and eventually one of OnDragExited or OnPerformDrop. |
| 22 virtual void OnDragEntered(const DropTargetEvent& event) = 0; | 26 virtual void OnDragEntered(const DropTargetEvent& event) = 0; |
| 23 | 27 |
| 24 // Invoked during a drag and drop session while the mouse is over the window. | 28 // Invoked during a drag and drop session while the mouse is over the window. |
| 25 // This should return a bitmask of the DragDropTypes::DragOperation supported | 29 // This should return a bitmask of the DragDropTypes::DragOperation supported |
| (...skipping 14 matching lines...) Expand all Loading... |
| 40 }; | 44 }; |
| 41 | 45 |
| 42 AURA_EXPORT void SetDragDropDelegate(Window* window, | 46 AURA_EXPORT void SetDragDropDelegate(Window* window, |
| 43 DragDropDelegate* delegate); | 47 DragDropDelegate* delegate); |
| 44 AURA_EXPORT DragDropDelegate* GetDragDropDelegate(Window* window); | 48 AURA_EXPORT DragDropDelegate* GetDragDropDelegate(Window* window); |
| 45 | 49 |
| 46 } // namespace client | 50 } // namespace client |
| 47 } // namespace aura | 51 } // namespace aura |
| 48 | 52 |
| 49 #endif // UI_AURA_CLIENT_DRAG_DROP_DELEGATE_H_ | 53 #endif // UI_AURA_CLIENT_DRAG_DROP_DELEGATE_H_ |
| OLD | NEW |