| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_manager_state.h" | 5 #include "services/ui/ws/window_manager_state.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 // Tests trigger calling this without a corresponding SetNativeCapture(). | 581 // Tests trigger calling this without a corresponding SetNativeCapture(). |
| 582 // TODO(sky): maybe abstract this away so that DCHECK can be added? | 582 // TODO(sky): maybe abstract this away so that DCHECK can be added? |
| 583 if (!platform_display_with_capture_) | 583 if (!platform_display_with_capture_) |
| 584 return; | 584 return; |
| 585 | 585 |
| 586 platform_display_with_capture_->ReleaseCapture(); | 586 platform_display_with_capture_->ReleaseCapture(); |
| 587 platform_display_with_capture_ = nullptr; | 587 platform_display_with_capture_ = nullptr; |
| 588 } | 588 } |
| 589 | 589 |
| 590 void WindowManagerState::UpdateNativeCursorFromDispatcher() { | 590 void WindowManagerState::UpdateNativeCursorFromDispatcher() { |
| 591 const ui::mojom::CursorType cursor_id = | 591 const ui::CursorData cursor = event_dispatcher_.GetCurrentMouseCursor(); |
| 592 event_dispatcher_.GetCurrentMouseCursor(); | |
| 593 for (Display* display : display_manager()->displays()) | 592 for (Display* display : display_manager()->displays()) |
| 594 display->UpdateNativeCursor(cursor_id); | 593 display->UpdateNativeCursor(cursor); |
| 595 } | 594 } |
| 596 | 595 |
| 597 void WindowManagerState::OnCaptureChanged(ServerWindow* new_capture, | 596 void WindowManagerState::OnCaptureChanged(ServerWindow* new_capture, |
| 598 ServerWindow* old_capture) { | 597 ServerWindow* old_capture) { |
| 599 window_server()->ProcessCaptureChanged(new_capture, old_capture); | 598 window_server()->ProcessCaptureChanged(new_capture, old_capture); |
| 600 } | 599 } |
| 601 | 600 |
| 602 void WindowManagerState::OnMouseCursorLocationChanged(const gfx::Point& point) { | 601 void WindowManagerState::OnMouseCursorLocationChanged(const gfx::Point& point) { |
| 603 window_server() | 602 window_server() |
| 604 ->display_manager() | 603 ->display_manager() |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 window->RemoveObserver(this); | 700 window->RemoveObserver(this); |
| 702 orphaned_window_manager_display_roots_.erase(iter); | 701 orphaned_window_manager_display_roots_.erase(iter); |
| 703 return; | 702 return; |
| 704 } | 703 } |
| 705 } | 704 } |
| 706 NOTREACHED(); | 705 NOTREACHED(); |
| 707 } | 706 } |
| 708 | 707 |
| 709 } // namespace ws | 708 } // namespace ws |
| 710 } // namespace ui | 709 } // namespace ui |
| OLD | NEW |