| Index: components/mus/ws/window_manager_state.cc
|
| diff --git a/components/mus/ws/window_manager_state.cc b/components/mus/ws/window_manager_state.cc
|
| index 8139b49a6d7fe4a01e87f7f18c4d1d2a129b52b4..1c31b8a01dadfcd931fcc31576343f3f5e406ee8 100644
|
| --- a/components/mus/ws/window_manager_state.cc
|
| +++ b/components/mus/ws/window_manager_state.cc
|
| @@ -56,6 +56,12 @@ std::unique_ptr<ui::Event> CoalesceEvents(std::unique_ptr<ui::Event> first,
|
|
|
| } // namespace
|
|
|
| +struct WindowManagerState::CurrentMoveLoopState {
|
| + uint32_t change_id;
|
| + WindowId window_id;
|
| + gfx::Rect revert_bounds;
|
| +};
|
| +
|
| class WindowManagerState::ProcessedEventTarget {
|
| public:
|
| ProcessedEventTarget(ServerWindow* window,
|
| @@ -129,6 +135,35 @@ bool WindowManagerState::SetCapture(ServerWindow* window,
|
| return event_dispatcher_.SetCaptureWindow(window, client_id);
|
| }
|
|
|
| +void WindowManagerState::StartMoveLoop(uint32_t change_id,
|
| + WindowId window_id,
|
| + const gfx::Rect& revert_bounds) {
|
| + current_move_loop_.reset(
|
| + new CurrentMoveLoopState{change_id, window_id, revert_bounds});
|
| +}
|
| +
|
| +void WindowManagerState::EndMoveLoop() {
|
| + current_move_loop_.reset();
|
| +}
|
| +
|
| +uint32_t WindowManagerState::GetCurrentMoveLoopChangeId() {
|
| + if (current_move_loop_)
|
| + return current_move_loop_->change_id;
|
| + return 0;
|
| +}
|
| +
|
| +WindowId WindowManagerState::GetCurrentMoveLoopWindowId() {
|
| + if (current_move_loop_)
|
| + return current_move_loop_->window_id;
|
| + return WindowId();
|
| +}
|
| +
|
| +gfx::Rect WindowManagerState::GetCurrentMoveLoopRevertBounds() {
|
| + if (current_move_loop_)
|
| + return current_move_loop_->revert_bounds;
|
| + return gfx::Rect();
|
| +}
|
| +
|
| void WindowManagerState::ReleaseCaptureBlockedByModalWindow(
|
| const ServerWindow* modal_window) {
|
| event_dispatcher_.ReleaseCaptureBlockedByModalWindow(modal_window);
|
|
|