Index: services/ui/public/cpp/window_tree_client.h |
diff --git a/services/ui/public/cpp/window_tree_client.h b/services/ui/public/cpp/window_tree_client.h |
index ba453b87fa96a60039c81ca8373aefccb566bb82..6c4bb43ac77c529510cd91ac0fa6c4fbecf6d3fa 100644 |
--- a/services/ui/public/cpp/window_tree_client.h |
+++ b/services/ui/public/cpp/window_tree_client.h |
@@ -108,6 +108,7 @@ class WindowTreeClient : public mojom::WindowTreeClient, |
void ClearHitTestMask(Id window_id); |
void SetFocus(Window* window); |
void SetCanFocus(Id window_id, bool can_focus); |
+ void SetCanAcceptDrops(Id window_id, bool can_accept_drops); |
void SetCanAcceptEvents(Id window_id, bool can_accept_events); |
void SetPredefinedCursor(Id window_id, ui::mojom::Cursor cursor_id); |
void SetVisible(Window* window, bool visible); |
@@ -175,6 +176,15 @@ class WindowTreeClient : public mojom::WindowTreeClient, |
void StartPointerWatcher(bool want_moves); |
void StopPointerWatcher(); |
+ void PerformDragDrop( |
+ Window* window, |
+ int drag_pointer, |
+ const std::map<std::string, std::vector<uint8_t>>& drag_data, |
+ int drag_operation, |
+ const gfx::Point& cursor_location, |
+ const SkBitmap& bitmap, |
+ const base::Callback<void(bool)>& callback); |
+ |
// Performs a window move. |callback| will be asynchronously called with the |
// whether the move loop completed successfully. |
void PerformWindowMove(Window* window, |
@@ -308,6 +318,26 @@ class WindowTreeClient : public mojom::WindowTreeClient, |
void OnWindowFocused(Id focused_window_id) override; |
void OnWindowPredefinedCursorChanged(Id window_id, |
mojom::Cursor cursor) override; |
+ void OnDragStart( |
+ Id window_id, |
+ mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data) override; |
+ void OnDragEnter(Id window_id, |
+ uint32_t key_state, |
+ const gfx::Point& position, |
+ uint32_t effect_bitmask, |
+ const OnDragEnterCallback& callback) override; |
+ void OnDragOver(Id window_id, |
+ uint32_t key_state, |
+ const gfx::Point& position, |
+ uint32_t effect_bitmask, |
+ const OnDragOverCallback& callback) override; |
+ void OnDragLeave(Id window_id) override; |
+ void OnDragDrop(Id window_id, |
+ uint32_t key_state, |
+ const gfx::Point& position, |
+ uint32_t effect_bitmask, |
+ const OnDragDropCallback& callback) override; |
+ void OnDragFinish(Id window_id) override; |
void OnChangeCompleted(uint32_t change_id, bool success) override; |
void RequestClose(uint32_t window_id) override; |
void GetWindowManager( |
@@ -413,13 +443,19 @@ class WindowTreeClient : public mojom::WindowTreeClient, |
// The current change id for the client. |
uint32_t current_move_loop_change_ = 0u; |
+ // Callback executed when a move loop initiated by PerformWindowMove() is |
+ // completed. |
+ base::Callback<void(bool)> on_current_move_finished_; |
+ |
// The current change id for the window manager. |
uint32_t current_wm_move_loop_change_ = 0u; |
Id current_wm_move_loop_window_id_ = 0u; |
- // Callback executed when a move loop initiated by PerformWindowMove() is |
- // completed. |
- base::Callback<void(bool)> on_current_move_finished_; |
+ // The current change id of the current drag an drop ipc. |
+ uint32_t current_drag_change_ = 0u; |
+ |
+ // Callback executed when a drag initiated by PerformDragDrop() is completed. |
+ base::Callback<void(bool)> on_current_drag_finished_; |
base::WeakPtrFactory<WindowTreeClient> weak_factory_; |