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

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

Issue 2060513002: Tab dragging as implemented as a mus API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dcheng nits Created 4 years, 5 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 8fb88337b2db27e8a605262d6a56006edf296c27..15108818cb839b6e1daa8717e7dae6adbd21a6e0 100644
--- a/services/ui/ws/window_server.cc
+++ b/services/ui/ws/window_server.cc
@@ -30,6 +30,13 @@
namespace ui {
namespace ws {
+struct WindowServer::CurrentMoveLoopState {
+ uint32_t change_id;
+ ServerWindow* window;
+ WindowTree* initiator;
+ gfx::Rect revert_bounds;
+};
+
WindowServer::WindowServer(
WindowServerDelegate* delegate,
const scoped_refptr<ui::SurfacesState>& surfaces_state)
@@ -415,6 +422,42 @@ void WindowServer::SetPaintCallback(
window_paint_callback_ = callback;
}
+void WindowServer::StartMoveLoop(uint32_t change_id,
+ ServerWindow* window,
+ WindowTree* initiator,
+ const gfx::Rect& revert_bounds) {
+ current_move_loop_.reset(
+ new CurrentMoveLoopState{change_id, window, initiator, revert_bounds});
+}
+
+void WindowServer::EndMoveLoop() {
+ current_move_loop_.reset();
+}
+
+uint32_t WindowServer::GetCurrentMoveLoopChangeId() {
+ if (current_move_loop_)
+ return current_move_loop_->change_id;
+ return 0;
+}
+
+ServerWindow* WindowServer::GetCurrentMoveLoopWindow() {
+ if (current_move_loop_)
+ return current_move_loop_->window;
+ return nullptr;
+}
+
+WindowTree* WindowServer::GetCurrentMoveLoopInitiator() {
+ if (current_move_loop_)
+ return current_move_loop_->initiator;
+ return nullptr;
+}
+
+gfx::Rect WindowServer::GetCurrentMoveLoopRevertBounds() {
+ if (current_move_loop_)
+ return current_move_loop_->revert_bounds;
+ return gfx::Rect();
+}
+
bool WindowServer::GetAndClearInFlightWindowManagerChange(
uint32_t window_manager_change_id,
InFlightWindowManagerChange* change) {
« 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