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_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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ui/aura/aura_export.h" | 9 #include "ui/aura/aura_export.h" |
10 #include "ui/aura/event.h" | 10 #include "ui/aura/event.h" |
11 | 11 |
12 namespace ui { | 12 namespace ui { |
13 class OSExchangeData; | 13 class OSExchangeData; |
14 } | 14 } |
15 | 15 |
16 namespace aura { | 16 namespace aura { |
17 class Window; | 17 class Window; |
18 namespace client { | 18 namespace client { |
19 | 19 |
| 20 // A property key to store the drag and drop client for the root window. The |
| 21 // type of the value is |aura::DragDropClient*|. |
| 22 AURA_EXPORT extern const char kRootWindowDragDropClientKey[]; |
| 23 |
20 // An interface implemented by an object that controls a drag and drop session. | 24 // An interface implemented by an object that controls a drag and drop session. |
21 class AURA_EXPORT DragDropClient { | 25 class AURA_EXPORT DragDropClient { |
22 public: | 26 public: |
23 virtual ~DragDropClient() {} | 27 virtual ~DragDropClient() {} |
24 | 28 |
25 // Initiates a drag and drop session. Returns the drag operation that was | 29 // Initiates a drag and drop session. Returns the drag operation that was |
26 // applied at the end of the drag drop session. | 30 // applied at the end of the drag drop session. |
27 virtual int StartDragAndDrop(const ui::OSExchangeData& data, | 31 virtual int StartDragAndDrop(const ui::OSExchangeData& data, |
28 int operation) = 0; | 32 int operation) = 0; |
29 | 33 |
(...skipping 10 matching lines...) Expand all Loading... |
40 virtual bool IsDragDropInProgress() = 0; | 44 virtual bool IsDragDropInProgress() = 0; |
41 }; | 45 }; |
42 | 46 |
43 AURA_EXPORT void SetDragDropClient(DragDropClient* client); | 47 AURA_EXPORT void SetDragDropClient(DragDropClient* client); |
44 AURA_EXPORT DragDropClient* GetDragDropClient(); | 48 AURA_EXPORT DragDropClient* GetDragDropClient(); |
45 | 49 |
46 } // namespace client | 50 } // namespace client |
47 } // namespace aura | 51 } // namespace aura |
48 | 52 |
49 #endif // UI_AURA_CLIENT_DRAG_DROP_CLIENT_H_ | 53 #endif // UI_AURA_CLIENT_DRAG_DROP_CLIENT_H_ |
OLD | NEW |