Chromium Code Reviews| 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 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 779 // DisplayCompositorFrameSink may submit a CompositorFrame without | 779 // DisplayCompositorFrameSink may submit a CompositorFrame without |
| 780 // creating a CompositorFrameSinkManager. | 780 // creating a CompositorFrameSinkManager. |
| 781 window->GetOrCreateCompositorFrameSinkManager()->SetLatestSurfaceInfo( | 781 window->GetOrCreateCompositorFrameSinkManager()->SetLatestSurfaceInfo( |
| 782 surface_info); | 782 surface_info); |
| 783 | 783 |
| 784 // FrameGenerator will add an appropriate reference for the new surface. | 784 // FrameGenerator will add an appropriate reference for the new surface. |
| 785 DCHECK(display_manager_->GetDisplayContaining(window)); | 785 DCHECK(display_manager_->GetDisplayContaining(window)); |
| 786 display_manager_->GetDisplayContaining(window) | 786 display_manager_->GetDisplayContaining(window) |
| 787 ->platform_display() | 787 ->platform_display() |
| 788 ->GetFrameGenerator() | 788 ->GetFrameGenerator() |
| 789 ->OnSurfaceCreated(surface_info.id(), window); | 789 ->OnSurfaceCreated(surface_info, window); |
|
Fady Samuel
2017/01/23 22:34:26
While you're at it, could you please also check th
| |
| 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 |
| 796 if (!window->parent()) | 796 if (!window->parent()) |
| 797 return; | 797 return; |
| 798 | 798 |
| 799 WindowTree* window_tree = GetTreeWithId(window->parent()->id().client_id); | 799 WindowTree* window_tree = GetTreeWithId(window->parent()->id().client_id); |
| 800 if (window_tree) | 800 if (window_tree) |
| 801 window_tree->ProcessWindowSurfaceChanged(window, surface_info); | 801 window_tree->ProcessWindowSurfaceChanged(window, surface_info); |
| 802 } | 802 } |
| 803 | 803 |
| 804 void WindowServer::OnActiveUserIdChanged(const UserId& previously_active_id, | 804 void WindowServer::OnActiveUserIdChanged(const UserId& previously_active_id, |
| 805 const UserId& active_id) { | 805 const UserId& active_id) { |
| 806 } | 806 } |
| 807 | 807 |
| 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 |