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_tree.h" | 5 #include "services/ui/ws/window_tree.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 2349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2360 DCHECK(window_manager_state_); | 2360 DCHECK(window_manager_state_); |
2361 window_manager_state_->cursor_state().SetCursorVisible(visible); | 2361 window_manager_state_->cursor_state().SetCursorVisible(visible); |
2362 } | 2362 } |
2363 | 2363 |
2364 void WindowTree::WmSetGlobalOverrideCursor( | 2364 void WindowTree::WmSetGlobalOverrideCursor( |
2365 base::Optional<ui::CursorData> cursor) { | 2365 base::Optional<ui::CursorData> cursor) { |
2366 DCHECK(window_manager_state_); | 2366 DCHECK(window_manager_state_); |
2367 window_manager_state_->cursor_state().SetGlobalOverrideCursor(cursor); | 2367 window_manager_state_->cursor_state().SetGlobalOverrideCursor(cursor); |
2368 } | 2368 } |
2369 | 2369 |
| 2370 void WindowTree::WmMoveCursorToDisplayLocation(const gfx::Point& display_pixels, |
| 2371 int64_t display_id) { |
| 2372 DCHECK(window_manager_state_); |
| 2373 window_manager_state_->SetCursorLocation(display_pixels, display_id); |
| 2374 } |
| 2375 |
2370 void WindowTree::OnWmCreatedTopLevelWindow(uint32_t change_id, | 2376 void WindowTree::OnWmCreatedTopLevelWindow(uint32_t change_id, |
2371 Id transport_window_id) { | 2377 Id transport_window_id) { |
2372 ServerWindow* window = | 2378 ServerWindow* window = |
2373 GetWindowByClientId(ClientWindowId(transport_window_id)); | 2379 GetWindowByClientId(ClientWindowId(transport_window_id)); |
2374 if (window && window->id().client_id != id_) { | 2380 if (window && window->id().client_id != id_) { |
2375 DVLOG(1) << "OnWmCreatedTopLevelWindow failed (invalid window id)"; | 2381 DVLOG(1) << "OnWmCreatedTopLevelWindow failed (invalid window id)"; |
2376 window_server_->WindowManagerSentBogusMessage(); | 2382 window_server_->WindowManagerSentBogusMessage(); |
2377 window = nullptr; | 2383 window = nullptr; |
2378 } | 2384 } |
2379 if (window) { | 2385 if (window) { |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2543 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, | 2549 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, |
2544 effect_bitmask, callback); | 2550 effect_bitmask, callback); |
2545 } | 2551 } |
2546 | 2552 |
2547 void WindowTree::PerformOnDragDropDone() { | 2553 void WindowTree::PerformOnDragDropDone() { |
2548 client()->OnDragDropDone(); | 2554 client()->OnDragDropDone(); |
2549 } | 2555 } |
2550 | 2556 |
2551 } // namespace ws | 2557 } // namespace ws |
2552 } // namespace ui | 2558 } // namespace ui |
OLD | NEW |