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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 return; | 775 return; |
776 | 776 |
777 // Cache the last submitted surface ID in the window server. | 777 // Cache the last submitted surface ID in the window server. |
778 // DisplayCompositorFrameSink may submit a CompositorFrame without | 778 // DisplayCompositorFrameSink may submit a CompositorFrame without |
779 // creating a CompositorFrameSinkManager. | 779 // creating a CompositorFrameSinkManager. |
780 window->GetOrCreateCompositorFrameSinkManager()->SetLatestSurfaceInfo( | 780 window->GetOrCreateCompositorFrameSinkManager()->SetLatestSurfaceInfo( |
781 surface_info); | 781 surface_info); |
782 | 782 |
783 // FrameGenerator will add an appropriate reference for the new surface. | 783 // FrameGenerator will add an appropriate reference for the new surface. |
784 DCHECK(display_manager_->GetDisplayContaining(window)); | 784 DCHECK(display_manager_->GetDisplayContaining(window)); |
785 auto display = display_manager_->GetDisplayContaining(window); | 785 auto* display = display_manager_->GetDisplayContaining(window); |
786 if (window == display->GetActiveRootWindow()) { | 786 if (window == display->GetActiveRootWindow()) { |
787 display->platform_display()->GetFrameGenerator()->OnSurfaceCreated( | 787 display->platform_display()->GetFrameGenerator()->OnSurfaceCreated( |
788 surface_info); | 788 surface_info); |
789 } | 789 } |
790 | 790 |
791 // This is only used for testing to observe that a window has a | 791 // This is only used for testing to observe that a window has a |
792 // CompositorFrame. | 792 // CompositorFrame. |
793 if (!window_paint_callback_.is_null()) | 793 if (!window_paint_callback_.is_null()) |
794 window_paint_callback_.Run(window); | 794 window_paint_callback_.Run(window); |
795 | 795 |
(...skipping 12 matching lines...) Expand all Loading... |
808 void WindowServer::OnUserIdAdded(const UserId& id) { | 808 void WindowServer::OnUserIdAdded(const UserId& id) { |
809 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); | 809 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); |
810 } | 810 } |
811 | 811 |
812 void WindowServer::OnUserIdRemoved(const UserId& id) { | 812 void WindowServer::OnUserIdRemoved(const UserId& id) { |
813 activity_monitor_map_.erase(id); | 813 activity_monitor_map_.erase(id); |
814 } | 814 } |
815 | 815 |
816 } // namespace ws | 816 } // namespace ws |
817 } // namespace ui | 817 } // namespace ui |
OLD | NEW |