| 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_server.h" | 5 #include "services/ui/ws/window_server.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 } | 589 } |
| 590 | 590 |
| 591 void WindowServer::UpdateNativeCursorIfOver(ServerWindow* window) { | 591 void WindowServer::UpdateNativeCursorIfOver(ServerWindow* window) { |
| 592 WindowManagerDisplayRoot* display_root = | 592 WindowManagerDisplayRoot* display_root = |
| 593 display_manager_->GetWindowManagerDisplayRoot(window); | 593 display_manager_->GetWindowManagerDisplayRoot(window); |
| 594 if (!display_root) | 594 if (!display_root) |
| 595 return; | 595 return; |
| 596 | 596 |
| 597 EventDispatcher* event_dispatcher = | 597 EventDispatcher* event_dispatcher = |
| 598 display_root->window_manager_state()->event_dispatcher(); | 598 display_root->window_manager_state()->event_dispatcher(); |
| 599 if (window != event_dispatcher->mouse_cursor_source_window()) | 599 if (window != event_dispatcher->GetWindowForMouseCursor()) |
| 600 return; | 600 return; |
| 601 | 601 |
| 602 event_dispatcher->UpdateNonClientAreaForCurrentWindow(); | 602 event_dispatcher->UpdateNonClientAreaForCurrentWindow(); |
| 603 display_root->display()->UpdateNativeCursor( | 603 display_root->display()->UpdateNativeCursor( |
| 604 event_dispatcher->GetCurrentMouseCursor()); | 604 event_dispatcher->GetCurrentMouseCursor()); |
| 605 } | 605 } |
| 606 | 606 |
| 607 bool WindowServer::IsUserInHighContrastMode(const UserId& user) const { | 607 bool WindowServer::IsUserInHighContrastMode(const UserId& user) const { |
| 608 const auto iter = high_contrast_mode_.find(user); | 608 const auto iter = high_contrast_mode_.find(user); |
| 609 return (iter == high_contrast_mode_.end()) ? false : iter->second; | 609 return (iter == high_contrast_mode_.end()) ? false : iter->second; |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 void WindowServer::OnUserIdAdded(const UserId& id) { | 811 void WindowServer::OnUserIdAdded(const UserId& id) { |
| 812 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); | 812 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); |
| 813 } | 813 } |
| 814 | 814 |
| 815 void WindowServer::OnUserIdRemoved(const UserId& id) { | 815 void WindowServer::OnUserIdRemoved(const UserId& id) { |
| 816 activity_monitor_map_.erase(id); | 816 activity_monitor_map_.erase(id); |
| 817 } | 817 } |
| 818 | 818 |
| 819 } // namespace ws | 819 } // namespace ws |
| 820 } // namespace ui | 820 } // namespace ui |
| OLD | NEW |