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

Unified Diff: services/ui/ws/window_server.cc

Issue 2266603002: mus: Implement interwindow drag and drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more comments Created 4 years, 3 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
« no previous file with comments | « services/ui/ws/window_server.h ('k') | services/ui/ws/window_tree.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_server.cc
diff --git a/services/ui/ws/window_server.cc b/services/ui/ws/window_server.cc
index dd5e3cae6261063b7fe094896a1deb36b3d9f6c9..f4d9a4ec082a6ee855a047df80d7a017b7b147d6 100644
--- a/services/ui/ws/window_server.cc
+++ b/services/ui/ws/window_server.cc
@@ -38,6 +38,12 @@ struct WindowServer::CurrentMoveLoopState {
gfx::Rect revert_bounds;
};
+struct WindowServer::CurrentDragLoopState {
+ uint32_t change_id;
+ ServerWindow* window;
+ WindowTree* initiator;
+};
+
WindowServer::WindowServer(WindowServerDelegate* delegate)
: delegate_(delegate),
surfaces_state_(new SurfacesState()),
@@ -484,6 +490,35 @@ gfx::Rect WindowServer::GetCurrentMoveLoopRevertBounds() {
return gfx::Rect();
}
+void WindowServer::StartDragLoop(uint32_t change_id,
+ ServerWindow* window,
+ WindowTree* initiator) {
+ current_drag_loop_.reset(
+ new CurrentDragLoopState{change_id, window, initiator});
+}
+
+void WindowServer::EndDragLoop() {
+ current_drag_loop_.reset();
+}
+
+uint32_t WindowServer::GetCurrentDragLoopChangeId() {
+ if (current_drag_loop_)
+ return current_drag_loop_->change_id;
+ return 0u;
+}
+
+ServerWindow* WindowServer::GetCurrentDragLoopWindow() {
+ if (current_drag_loop_)
+ return current_drag_loop_->window;
+ return nullptr;
+}
+
+WindowTree* WindowServer::GetCurrentDragLoopInitiator() {
+ if (current_drag_loop_)
+ return current_drag_loop_->initiator;
+ return nullptr;
+}
+
void WindowServer::OnDisplayReady(Display* display, bool is_first) {
if (gpu_channel_)
display->platform_display()->OnGpuChannelEstablished(gpu_channel_);
« no previous file with comments | « services/ui/ws/window_server.h ('k') | services/ui/ws/window_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698