| 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/service_manager/public/interfaces/connector.mojom.h" | 10 #include "services/service_manager/public/interfaces/connector.mojom.h" |
| 11 #include "services/ui/common/accelerator_util.h" | 11 #include "services/ui/common/accelerator_util.h" |
| 12 #include "services/ui/ws/accelerator.h" | 12 #include "services/ui/ws/accelerator.h" |
| 13 #include "services/ui/ws/cursor_location_manager.h" |
| 13 #include "services/ui/ws/display.h" | 14 #include "services/ui/ws/display.h" |
| 14 #include "services/ui/ws/display_manager.h" | 15 #include "services/ui/ws/display_manager.h" |
| 15 #include "services/ui/ws/platform_display.h" | 16 #include "services/ui/ws/platform_display.h" |
| 16 #include "services/ui/ws/server_window.h" | 17 #include "services/ui/ws/server_window.h" |
| 17 #include "services/ui/ws/user_display_manager.h" | 18 #include "services/ui/ws/user_display_manager.h" |
| 18 #include "services/ui/ws/user_id_tracker.h" | 19 #include "services/ui/ws/user_id_tracker.h" |
| 19 #include "services/ui/ws/window_manager_display_root.h" | 20 #include "services/ui/ws/window_manager_display_root.h" |
| 20 #include "services/ui/ws/window_server.h" | 21 #include "services/ui/ws/window_server.h" |
| 21 #include "services/ui/ws/window_tree.h" | 22 #include "services/ui/ws/window_tree.h" |
| 22 #include "ui/events/event.h" | 23 #include "ui/events/event.h" |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 } | 565 } |
| 565 | 566 |
| 566 void WindowManagerState::OnCaptureChanged(ServerWindow* new_capture, | 567 void WindowManagerState::OnCaptureChanged(ServerWindow* new_capture, |
| 567 ServerWindow* old_capture) { | 568 ServerWindow* old_capture) { |
| 568 window_server()->ProcessCaptureChanged(new_capture, old_capture); | 569 window_server()->ProcessCaptureChanged(new_capture, old_capture); |
| 569 } | 570 } |
| 570 | 571 |
| 571 void WindowManagerState::OnMouseCursorLocationChanged(const gfx::Point& point) { | 572 void WindowManagerState::OnMouseCursorLocationChanged(const gfx::Point& point) { |
| 572 window_server() | 573 window_server() |
| 573 ->display_manager() | 574 ->display_manager() |
| 574 ->GetUserDisplayManager(user_id()) | 575 ->GetCursorLocationManager(user_id()) |
| 575 ->OnMouseCursorLocationChanged(point); | 576 ->OnMouseCursorLocationChanged(point); |
| 576 } | 577 } |
| 577 | 578 |
| 578 void WindowManagerState::DispatchInputEventToWindow(ServerWindow* target, | 579 void WindowManagerState::DispatchInputEventToWindow(ServerWindow* target, |
| 579 ClientSpecificId client_id, | 580 ClientSpecificId client_id, |
| 580 const ui::Event& event, | 581 const ui::Event& event, |
| 581 Accelerator* accelerator) { | 582 Accelerator* accelerator) { |
| 582 DCHECK(IsActive()); | 583 DCHECK(IsActive()); |
| 583 // TODO(sky): this needs to see if another wms has capture and if so forward | 584 // TODO(sky): this needs to see if another wms has capture and if so forward |
| 584 // to it. | 585 // to it. |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 window->RemoveObserver(this); | 669 window->RemoveObserver(this); |
| 669 orphaned_window_manager_display_roots_.erase(iter); | 670 orphaned_window_manager_display_roots_.erase(iter); |
| 670 return; | 671 return; |
| 671 } | 672 } |
| 672 } | 673 } |
| 673 NOTREACHED(); | 674 NOTREACHED(); |
| 674 } | 675 } |
| 675 | 676 |
| 676 } // namespace ws | 677 } // namespace ws |
| 677 } // namespace ui | 678 } // namespace ui |
| OLD | NEW |