| 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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 IsOperationSource(pair.first)); | 413 IsOperationSource(pair.first)); |
| 414 } | 414 } |
| 415 } | 415 } |
| 416 | 416 |
| 417 void WindowServer::ProcessWindowDeleted(ServerWindow* window) { | 417 void WindowServer::ProcessWindowDeleted(ServerWindow* window) { |
| 418 for (auto& pair : tree_map_) | 418 for (auto& pair : tree_map_) |
| 419 pair.second->ProcessWindowDeleted(window, IsOperationSource(pair.first)); | 419 pair.second->ProcessWindowDeleted(window, IsOperationSource(pair.first)); |
| 420 } | 420 } |
| 421 | 421 |
| 422 void WindowServer::ProcessWillChangeWindowPredefinedCursor( | 422 void WindowServer::ProcessWillChangeWindowPredefinedCursor( |
| 423 ServerWindow* window, mojom::Cursor cursor_id) { | 423 ServerWindow* window, |
| 424 mojom::CursorType cursor_id) { |
| 424 for (auto& pair : tree_map_) { | 425 for (auto& pair : tree_map_) { |
| 425 pair.second->ProcessCursorChanged(window, cursor_id, | 426 pair.second->ProcessCursorChanged(window, cursor_id, |
| 426 IsOperationSource(pair.first)); | 427 IsOperationSource(pair.first)); |
| 427 } | 428 } |
| 428 } | 429 } |
| 429 | 430 |
| 430 void WindowServer::SendToPointerWatchers(const ui::Event& event, | 431 void WindowServer::SendToPointerWatchers(const ui::Event& event, |
| 431 const UserId& user_id, | 432 const UserId& user_id, |
| 432 ServerWindow* target_window, | 433 ServerWindow* target_window, |
| 433 WindowTree* ignore_tree, | 434 WindowTree* ignore_tree, |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 if (in_destructor_) | 745 if (in_destructor_) |
| 745 return; | 746 return; |
| 746 | 747 |
| 747 WindowManagerDisplayRoot* display_root = | 748 WindowManagerDisplayRoot* display_root = |
| 748 display_manager_->GetWindowManagerDisplayRoot(window); | 749 display_manager_->GetWindowManagerDisplayRoot(window); |
| 749 if (display_root) | 750 if (display_root) |
| 750 display_root->window_manager_state()->ReleaseCaptureBlockedByModalWindow( | 751 display_root->window_manager_state()->ReleaseCaptureBlockedByModalWindow( |
| 751 window); | 752 window); |
| 752 } | 753 } |
| 753 | 754 |
| 754 void WindowServer::OnWindowPredefinedCursorChanged(ServerWindow* window, | 755 void WindowServer::OnWindowPredefinedCursorChanged( |
| 755 mojom::Cursor cursor_id) { | 756 ServerWindow* window, |
| 757 mojom::CursorType cursor_id) { |
| 756 if (in_destructor_) | 758 if (in_destructor_) |
| 757 return; | 759 return; |
| 758 | 760 |
| 759 ProcessWillChangeWindowPredefinedCursor(window, cursor_id); | 761 ProcessWillChangeWindowPredefinedCursor(window, cursor_id); |
| 760 | 762 |
| 761 UpdateNativeCursorIfOver(window); | 763 UpdateNativeCursorIfOver(window); |
| 762 } | 764 } |
| 763 | 765 |
| 764 void WindowServer::OnWindowNonClientCursorChanged(ServerWindow* window, | 766 void WindowServer::OnWindowNonClientCursorChanged(ServerWindow* window, |
| 765 mojom::Cursor cursor_id) { | 767 mojom::CursorType cursor_id) { |
| 766 if (in_destructor_) | 768 if (in_destructor_) |
| 767 return; | 769 return; |
| 768 | 770 |
| 769 UpdateNativeCursorIfOver(window); | 771 UpdateNativeCursorIfOver(window); |
| 770 } | 772 } |
| 771 | 773 |
| 772 void WindowServer::OnWindowSharedPropertyChanged( | 774 void WindowServer::OnWindowSharedPropertyChanged( |
| 773 ServerWindow* window, | 775 ServerWindow* window, |
| 774 const std::string& name, | 776 const std::string& name, |
| 775 const std::vector<uint8_t>* new_data) { | 777 const std::vector<uint8_t>* new_data) { |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 void WindowServer::OnUserIdAdded(const UserId& id) { | 858 void WindowServer::OnUserIdAdded(const UserId& id) { |
| 857 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); | 859 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); |
| 858 } | 860 } |
| 859 | 861 |
| 860 void WindowServer::OnUserIdRemoved(const UserId& id) { | 862 void WindowServer::OnUserIdRemoved(const UserId& id) { |
| 861 activity_monitor_map_.erase(id); | 863 activity_monitor_map_.erase(id); |
| 862 } | 864 } |
| 863 | 865 |
| 864 } // namespace ws | 866 } // namespace ws |
| 865 } // namespace ui | 867 } // namespace ui |
| OLD | NEW |