Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(776)

Unified Diff: services/ui/ws/window_tree.h

Issue 2266603002: mus: Implement interwindow drag and drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Uploaded for a few comments. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: services/ui/ws/window_tree.h
diff --git a/services/ui/ws/window_tree.h b/services/ui/ws/window_tree.h
index 2f0f9445598ac00942deb714d87b5bc77c6697d2..b187f9ec7c648b7e5ffac2b7a406fa141581758c 100644
--- a/services/ui/ws/window_tree.h
+++ b/services/ui/ws/window_tree.h
@@ -193,6 +193,27 @@ class WindowTree : public mojom::WindowTree,
// window(s).
void ClientJankinessChanged(WindowTree* tree);
+ // The following methods send drag and drop messages to the client and return
+ // their results through the passed in callback.
+ void PerformOnDragEnter(
+ const ServerWindow* window,
+ mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data,
+ uint32_t key_state,
+ const gfx::Point& cursor_offset,
+ uint32_t effect_bitmask,
+ const base::Callback<void(uint32_t)>& callback);
+ void PerformOnDragOver(const ServerWindow* window,
+ uint32_t key_state,
+ const gfx::Point& cursor_offset,
+ uint32_t effect_bitmask,
+ const base::Callback<void(uint32_t)>& callback);
+ void PerformOnDragLeave(const ServerWindow* window);
+ void PerformOnDragDrop(const ServerWindow* window,
+ uint32_t key_state,
+ const gfx::Point& cursor_offset,
+ uint32_t effect_bitmask,
+ const base::Callback<void(uint32_t)>& callback);
+
// The following methods are invoked after the corresponding change has been
// processed. They do the appropriate bookkeeping and update the client as
// necessary.
@@ -418,6 +439,7 @@ class WindowTree : public mojom::WindowTree,
Id transport_window_id,
const gfx::Insets& insets,
mojo::Array<gfx::Rect> transport_additional_client_areas) override;
+ void SetCanAcceptDrags(Id window_id, bool accepts_drags) override;
void SetHitTestMask(Id transport_window_id,
const base::Optional<gfx::Rect>& mask) override;
void GetWindowManagerClient(
@@ -425,6 +447,12 @@ class WindowTree : public mojom::WindowTree,
override;
void GetCursorLocationMemory(const GetCursorLocationMemoryCallback& callback)
override;
+ void PerformDragDrop(uint32_t change_id,
+ uint32_t source_window_id,
+ mojo::Map<mojo::String, mojo::Array<uint8_t>> drag_data,
+ uint32_t drag_operation,
+ const gfx::Point& cursor_offset,
+ const SkBitmap& drag_representation) override;
void PerformWindowMove(uint32_t change_id,
Id window_id,
ui::mojom::MoveLoopSource source,

Powered by Google App Engine
This is Rietveld 408576698