| 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/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "services/shell/public/interfaces/connector.mojom.h" | 10 #include "services/shell/public/interfaces/connector.mojom.h" |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 // Tests trigger calling this without a corresponding SetNativeCapture(). | 520 // Tests trigger calling this without a corresponding SetNativeCapture(). |
| 521 // TODO(sky): maybe abstract this away so that DCHECK can be added? | 521 // TODO(sky): maybe abstract this away so that DCHECK can be added? |
| 522 if (!platform_display_with_capture_) | 522 if (!platform_display_with_capture_) |
| 523 return; | 523 return; |
| 524 | 524 |
| 525 platform_display_with_capture_->ReleaseCapture(); | 525 platform_display_with_capture_->ReleaseCapture(); |
| 526 platform_display_with_capture_ = nullptr; | 526 platform_display_with_capture_ = nullptr; |
| 527 } | 527 } |
| 528 | 528 |
| 529 void WindowManagerState::UpdateNativeCursorFromDispatcher() { | 529 void WindowManagerState::UpdateNativeCursorFromDispatcher() { |
| 530 int32_t cursor_id = 0; | 530 ui::mojom::Cursor cursor_id = mojom::Cursor::CURSOR_NULL; |
| 531 if (event_dispatcher_.GetCurrentMouseCursor(&cursor_id)) { | 531 if (event_dispatcher_.GetCurrentMouseCursor(&cursor_id)) { |
| 532 for (Display* display : display_manager()->displays()) | 532 for (Display* display : display_manager()->displays()) |
| 533 display->UpdateNativeCursor(cursor_id); | 533 display->UpdateNativeCursor(cursor_id); |
| 534 } | 534 } |
| 535 } | 535 } |
| 536 | 536 |
| 537 void WindowManagerState::OnCaptureChanged(ServerWindow* new_capture, | 537 void WindowManagerState::OnCaptureChanged(ServerWindow* new_capture, |
| 538 ServerWindow* old_capture) { | 538 ServerWindow* old_capture) { |
| 539 window_server()->ProcessCaptureChanged(new_capture, old_capture); | 539 window_server()->ProcessCaptureChanged(new_capture, old_capture); |
| 540 } | 540 } |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 window->RemoveObserver(this); | 635 window->RemoveObserver(this); |
| 636 orphaned_window_manager_display_roots_.erase(iter); | 636 orphaned_window_manager_display_roots_.erase(iter); |
| 637 return; | 637 return; |
| 638 } | 638 } |
| 639 } | 639 } |
| 640 NOTREACHED(); | 640 NOTREACHED(); |
| 641 } | 641 } |
| 642 | 642 |
| 643 } // namespace ws | 643 } // namespace ws |
| 644 } // namespace ui | 644 } // namespace ui |
| OLD | NEW |