OLD | NEW |
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 "services/ui/ws/window_server.h" | 5 #include "services/ui/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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 return current_move_loop_->initiator; | 477 return current_move_loop_->initiator; |
478 return nullptr; | 478 return nullptr; |
479 } | 479 } |
480 | 480 |
481 gfx::Rect WindowServer::GetCurrentMoveLoopRevertBounds() { | 481 gfx::Rect WindowServer::GetCurrentMoveLoopRevertBounds() { |
482 if (current_move_loop_) | 482 if (current_move_loop_) |
483 return current_move_loop_->revert_bounds; | 483 return current_move_loop_->revert_bounds; |
484 return gfx::Rect(); | 484 return gfx::Rect(); |
485 } | 485 } |
486 | 486 |
| 487 void WindowServer::StartDragLoop(uint32_t change_id) { |
| 488 current_drag_loop_ = change_id; |
| 489 } |
| 490 |
| 491 void WindowServer::EndDragLoop() { |
| 492 current_drag_loop_.reset(); |
| 493 } |
| 494 |
| 495 uint32_t WindowServer::GetCurrentDragLoopChangeId() { |
| 496 return current_drag_loop_.value_or(0u); |
| 497 } |
| 498 |
487 bool WindowServer::GetAndClearInFlightWindowManagerChange( | 499 bool WindowServer::GetAndClearInFlightWindowManagerChange( |
488 uint32_t window_manager_change_id, | 500 uint32_t window_manager_change_id, |
489 InFlightWindowManagerChange* change) { | 501 InFlightWindowManagerChange* change) { |
490 // There are valid reasons as to why we wouldn't know about the id. The | 502 // There are valid reasons as to why we wouldn't know about the id. The |
491 // most likely is the client disconnected before the response from the window | 503 // most likely is the client disconnected before the response from the window |
492 // manager came back. | 504 // manager came back. |
493 auto iter = in_flight_wm_change_map_.find(window_manager_change_id); | 505 auto iter = in_flight_wm_change_map_.find(window_manager_change_id); |
494 if (iter == in_flight_wm_change_map_.end()) | 506 if (iter == in_flight_wm_change_map_.end()) |
495 return false; | 507 return false; |
496 | 508 |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 clipboard_map_[id] = base::MakeUnique<clipboard::ClipboardImpl>(); | 794 clipboard_map_[id] = base::MakeUnique<clipboard::ClipboardImpl>(); |
783 } | 795 } |
784 | 796 |
785 void WindowServer::OnUserIdRemoved(const UserId& id) { | 797 void WindowServer::OnUserIdRemoved(const UserId& id) { |
786 activity_monitor_map_.erase(id); | 798 activity_monitor_map_.erase(id); |
787 clipboard_map_.erase(id); | 799 clipboard_map_.erase(id); |
788 } | 800 } |
789 | 801 |
790 } // namespace ws | 802 } // namespace ws |
791 } // namespace ui | 803 } // namespace ui |
OLD | NEW |