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

Side by Side Diff: components/mus/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: General patch cleanup. Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/mus/ws/window_server.h" 5 #include "components/mus/ws/window_server.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 !window || window->id().client_id != wm_tree->id() || 305 !window || window->id().client_id != wm_tree->id() ||
306 !window->children().empty() || GetTreeWithRoot(window)) { 306 !window->children().empty() || GetTreeWithRoot(window)) {
307 WindowManagerSentBogusMessage(); 307 WindowManagerSentBogusMessage();
308 return; 308 return;
309 } 309 }
310 310
311 tree->OnWindowManagerCreatedTopLevelWindow(window_manager_change_id, 311 tree->OnWindowManagerCreatedTopLevelWindow(window_manager_change_id,
312 change.client_change_id, window); 312 change.client_change_id, window);
313 } 313 }
314 314
315 void WindowServer::WindowManagerCompletedMoveLoop(
316 uint32_t window_manager_change_id,
317 const ServerWindow* window,
318 bool completed) {
319 InFlightWindowManagerChange change;
320 if (!GetAndClearInFlightWindowManagerChange(window_manager_change_id,
321 &change)) {
322 return;
323 }
324 if (!window) {
325 WindowManagerSentBogusMessage();
326 return;
327 }
328
329 WindowTree* tree = GetTreeWithId(change.client_id);
330 tree->OnMoveLoopCompleted(change.client_change_id, completed);
331 }
332
315 void WindowServer::ProcessWindowBoundsChanged(const ServerWindow* window, 333 void WindowServer::ProcessWindowBoundsChanged(const ServerWindow* window,
316 const gfx::Rect& old_bounds, 334 const gfx::Rect& old_bounds,
317 const gfx::Rect& new_bounds) { 335 const gfx::Rect& new_bounds) {
318 for (auto& pair : tree_map_) { 336 for (auto& pair : tree_map_) {
319 pair.second->ProcessWindowBoundsChanged(window, old_bounds, new_bounds, 337 pair.second->ProcessWindowBoundsChanged(window, old_bounds, new_bounds,
320 IsOperationSource(pair.first)); 338 IsOperationSource(pair.first));
321 } 339 }
322 } 340 }
323 341
324 void WindowServer::ProcessClientAreaChanged( 342 void WindowServer::ProcessClientAreaChanged(
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 .GetGlobalWindowManagerStateForUser(user_id); 689 .GetGlobalWindowManagerStateForUser(user_id);
672 if (!global_window_manager_state) 690 if (!global_window_manager_state)
673 return false; 691 return false;
674 if (values && global_window_manager_state->got_frame_decoration_values()) 692 if (values && global_window_manager_state->got_frame_decoration_values())
675 *values = global_window_manager_state->frame_decoration_values().Clone(); 693 *values = global_window_manager_state->frame_decoration_values().Clone();
676 return global_window_manager_state->got_frame_decoration_values(); 694 return global_window_manager_state->got_frame_decoration_values();
677 } 695 }
678 696
679 } // namespace ws 697 } // namespace ws
680 } // namespace mus 698 } // namespace mus
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698