| Index: ui/aura/mus/window_tree_client.cc
|
| diff --git a/ui/aura/mus/window_tree_client.cc b/ui/aura/mus/window_tree_client.cc
|
| index 2c22cb46b6e0bbb51164e6501d08c7bc71d076ce..8c530e1fde361d8f9778ac6b8014320126798507 100644
|
| --- a/ui/aura/mus/window_tree_client.cc
|
| +++ b/ui/aura/mus/window_tree_client.cc
|
| @@ -809,26 +809,6 @@ void WindowTreeClient::StopPointerWatcher() {
|
| has_pointer_watcher_ = false;
|
| }
|
|
|
| -void WindowTreeClient::PerformWindowMove(
|
| - Window* window,
|
| - ui::mojom::MoveLoopSource source,
|
| - const gfx::Point& cursor_location,
|
| - const base::Callback<void(bool)>& callback) {
|
| - DCHECK(on_current_move_finished_.is_null());
|
| - on_current_move_finished_ = callback;
|
| -
|
| - WindowMus* window_mus = WindowMus::Get(window);
|
| - current_move_loop_change_ = ScheduleInFlightChange(
|
| - base::MakeUnique<InFlightDragChange>(window_mus, ChangeType::MOVE_LOOP));
|
| - // Tell the window manager to take over moving us.
|
| - tree_->PerformWindowMove(current_move_loop_change_, window_mus->server_id(),
|
| - source, cursor_location);
|
| -}
|
| -
|
| -void WindowTreeClient::CancelWindowMove(Window* window) {
|
| - tree_->CancelWindowMove(WindowMus::Get(window)->server_id());
|
| -}
|
| -
|
| void WindowTreeClient::AddObserver(WindowTreeClientObserver* observer) {
|
| observers_.AddObserver(observer);
|
| }
|
| @@ -1710,6 +1690,28 @@ void WindowTreeClient::OnWindowTreeHostStackAtTop(
|
| tree_->StackAtTop(change_id, window->server_id());
|
| }
|
|
|
| +void WindowTreeClient::OnWindowTreeHostPerformWindowMove(
|
| + WindowTreeHostMus* window_tree_host,
|
| + ui::mojom::MoveLoopSource source,
|
| + const gfx::Point& cursor_location,
|
| + const base::Callback<void(bool)>& callback) {
|
| + DCHECK(on_current_move_finished_.is_null());
|
| + on_current_move_finished_ = callback;
|
| +
|
| + WindowMus* window_mus = WindowMus::Get(window_tree_host->window());
|
| + current_move_loop_change_ = ScheduleInFlightChange(
|
| + base::MakeUnique<InFlightDragChange>(window_mus, ChangeType::MOVE_LOOP));
|
| + // Tell the window manager to take over moving us.
|
| + tree_->PerformWindowMove(current_move_loop_change_, window_mus->server_id(),
|
| + source, cursor_location);
|
| +}
|
| +
|
| +void WindowTreeClient::OnWindowTreeHostCancelWindowMove(
|
| + WindowTreeHostMus* window_tree_host) {
|
| + tree_->CancelWindowMove(
|
| + WindowMus::Get(window_tree_host->window())->server_id());
|
| +}
|
| +
|
| std::unique_ptr<WindowPortMus> WindowTreeClient::CreateWindowPortForTopLevel(
|
| const std::map<std::string, std::vector<uint8_t>>* properties) {
|
| std::unique_ptr<WindowPortMus> window_port =
|
|
|