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 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 879 display->platform_display()->GetFrameGenerator()->OnSurfaceCreated( | 879 display->platform_display()->GetFrameGenerator()->OnSurfaceCreated( |
| 880 surface_info); | 880 surface_info); |
| 881 display->root_window() | 881 display->root_window() |
| 882 ->GetOrCreateCompositorFrameSinkManager() | 882 ->GetOrCreateCompositorFrameSinkManager() |
| 883 ->ClaimTemporaryReference(surface_info.id()); | 883 ->ClaimTemporaryReference(surface_info.id()); |
| 884 return; | 884 return; |
| 885 } | 885 } |
| 886 | 886 |
| 887 HandleTemporaryReferenceForNewSurface(surface_info.id(), window); | 887 HandleTemporaryReferenceForNewSurface(surface_info.id(), window); |
| 888 | 888 |
| 889 if (!window->parent()) | 889 // We always use the owner of the window's id (even for embedded window), |
|
Fady Samuel
2017/06/08 17:46:24
for an
Peng
2017/06/08 18:03:31
Done.
| |
| 890 return; | 890 // because an embedded window's id is allocated by the parent's window tree. |
| 891 | 891 WindowTree* window_tree = GetTreeWithId(window->id().client_id); |
| 892 WindowTree* window_tree = GetTreeWithId(window->parent()->id().client_id); | |
| 893 if (window_tree) | 892 if (window_tree) |
| 894 window_tree->ProcessWindowSurfaceChanged(window, surface_info); | 893 window_tree->ProcessWindowSurfaceChanged(window, surface_info); |
| 895 } | 894 } |
| 896 | 895 |
| 897 void WindowServer::OnActiveUserIdChanged(const UserId& previously_active_id, | 896 void WindowServer::OnActiveUserIdChanged(const UserId& previously_active_id, |
| 898 const UserId& active_id) { | 897 const UserId& active_id) { |
| 899 } | 898 } |
| 900 | 899 |
| 901 void WindowServer::OnUserIdAdded(const UserId& id) { | 900 void WindowServer::OnUserIdAdded(const UserId& id) { |
| 902 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); | 901 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); |
| 903 } | 902 } |
| 904 | 903 |
| 905 void WindowServer::OnUserIdRemoved(const UserId& id) { | 904 void WindowServer::OnUserIdRemoved(const UserId& id) { |
| 906 activity_monitor_map_.erase(id); | 905 activity_monitor_map_.erase(id); |
| 907 } | 906 } |
| 908 | 907 |
| 909 } // namespace ws | 908 } // namespace ws |
| 910 } // namespace ui | 909 } // namespace ui |
| OLD | NEW |