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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 WindowManagerState* window_manager_state = | 542 WindowManagerState* window_manager_state = |
543 window_manager_window_tree_factory_set_.GetWindowManagerStateForUser( | 543 window_manager_window_tree_factory_set_.GetWindowManagerStateForUser( |
544 user_id); | 544 user_id); |
545 if (!window_manager_state) | 545 if (!window_manager_state) |
546 return false; | 546 return false; |
547 if (values && window_manager_state->got_frame_decoration_values()) | 547 if (values && window_manager_state->got_frame_decoration_values()) |
548 *values = window_manager_state->frame_decoration_values().Clone(); | 548 *values = window_manager_state->frame_decoration_values().Clone(); |
549 return window_manager_state->got_frame_decoration_values(); | 549 return window_manager_state->got_frame_decoration_values(); |
550 } | 550 } |
551 | 551 |
| 552 void WindowServer::AddPlatformDisplay( |
| 553 std::unique_ptr<PlatformDisplay> platform_display) { |
| 554 platform_displays_.insert(std::move(platform_display)); |
| 555 } |
| 556 |
| 557 void WindowServer::RemovePlatformDisplay(PlatformDisplay* platform_display) { |
| 558 for (auto& pd : platform_displays_) { |
| 559 if (pd.get() == platform_display) { |
| 560 platform_displays_.erase(pd); |
| 561 break; |
| 562 } |
| 563 } |
| 564 } |
| 565 |
552 bool WindowServer::GetAndClearInFlightWindowManagerChange( | 566 bool WindowServer::GetAndClearInFlightWindowManagerChange( |
553 uint32_t window_manager_change_id, | 567 uint32_t window_manager_change_id, |
554 InFlightWindowManagerChange* change) { | 568 InFlightWindowManagerChange* change) { |
555 // There are valid reasons as to why we wouldn't know about the id. The | 569 // There are valid reasons as to why we wouldn't know about the id. The |
556 // most likely is the client disconnected before the response from the window | 570 // most likely is the client disconnected before the response from the window |
557 // manager came back. | 571 // manager came back. |
558 auto iter = in_flight_wm_change_map_.find(window_manager_change_id); | 572 auto iter = in_flight_wm_change_map_.find(window_manager_change_id); |
559 if (iter == in_flight_wm_change_map_.end()) | 573 if (iter == in_flight_wm_change_map_.end()) |
560 return false; | 574 return false; |
561 | 575 |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 void WindowServer::OnUserIdAdded(const UserId& id) { | 825 void WindowServer::OnUserIdAdded(const UserId& id) { |
812 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); | 826 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); |
813 } | 827 } |
814 | 828 |
815 void WindowServer::OnUserIdRemoved(const UserId& id) { | 829 void WindowServer::OnUserIdRemoved(const UserId& id) { |
816 activity_monitor_map_.erase(id); | 830 activity_monitor_map_.erase(id); |
817 } | 831 } |
818 | 832 |
819 } // namespace ws | 833 } // namespace ws |
820 } // namespace ui | 834 } // namespace ui |
OLD | NEW |