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

Unified Diff: ui/aura/mus/window_tree_client.cc

Issue 2657003004: aura-mus: Hook up PerformWindowMove(). (Closed)
Patch Set: Fold PerformWindowMove and CancelWindowMove. Created 3 years, 11 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 | « ui/aura/mus/window_tree_client.h ('k') | ui/aura/mus/window_tree_host_mus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 =
« no previous file with comments | « ui/aura/mus/window_tree_client.h ('k') | ui/aura/mus/window_tree_host_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698