OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef SERVICES_UI_WS_DRAG_TARGET_CONNECTION_H_ | |
6 #define SERVICES_UI_WS_DRAG_TARGET_CONNECTION_H_ | |
7 | |
8 #include "base/bind.h" | |
9 #include "mojo/public/cpp/bindings/array.h" | |
10 #include "mojo/public/cpp/bindings/map.h" | |
11 #include "mojo/public/cpp/bindings/string.h" | |
12 #include "ui/gfx/geometry/point.h" | |
13 | |
14 namespace ui { | |
15 namespace ws { | |
16 | |
17 class ServerWindow; | |
18 | |
19 // An abstract connection which can respond to drag/drop target requests. | |
20 // | |
21 // The methods in this class send drag and drop messages to the client and | |
22 // return their results through the passed in callback. | |
23 class DragTargetConnection { | |
24 public: | |
25 virtual ~DragTargetConnection() {} | |
26 | |
27 virtual void PerformOnDragStart( | |
28 const ServerWindow* window, | |
29 mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data) = 0; | |
30 | |
31 virtual void PerformOnDragEnter( | |
32 const ServerWindow* window, | |
33 uint32_t key_state, | |
34 const gfx::Point& cursor_offset, | |
35 uint32_t effect_bitmask, | |
36 const base::Callback<void(uint32_t)>& callback) = 0; | |
37 | |
38 virtual void PerformOnDragOver( | |
39 const ServerWindow* window, | |
40 uint32_t key_state, | |
41 const gfx::Point& cursor_offset, | |
42 uint32_t effect_bitmask, | |
43 const base::Callback<void(uint32_t)>& callback) = 0; | |
44 | |
45 virtual void PerformOnDragLeave(const ServerWindow* window) = 0; | |
46 | |
47 virtual void PerformOnDragDrop( | |
48 const ServerWindow* window, | |
49 uint32_t key_state, | |
50 const gfx::Point& cursor_offset, | |
51 uint32_t effect_bitmask, | |
52 const base::Callback<void(uint32_t)>& callback) = 0; | |
53 | |
54 virtual void PerformOnDragFinish(const ServerWindow* window) = 0; | |
sky
2016/09/06 21:11:27
Document when this is sent. It isn't clear how it
| |
55 }; | |
56 | |
57 } // namespace ws | |
58 } // namespace ui | |
59 | |
60 #endif // SERVICES_UI_WS_DRAG_TARGET_CONNECTION_H_ | |
OLD | NEW |