Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Side by Side Diff: services/ui/ws/window_server.cc

Issue 2875753002: Implement aura::WindowPortMus::CreateCompositorFrameSink() (Closed)
Patch Set: Update Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 // part of a WindowTree. Send the SurfaceId directly to FrameGenerator and 859 // part of a WindowTree. Send the SurfaceId directly to FrameGenerator and
860 // claim the temporary reference for the display root. 860 // claim the temporary reference for the display root.
861 display->platform_display()->GetFrameGenerator()->OnSurfaceCreated( 861 display->platform_display()->GetFrameGenerator()->OnSurfaceCreated(
862 surface_info); 862 surface_info);
863 display->root_window() 863 display->root_window()
864 ->GetOrCreateCompositorFrameSinkManager() 864 ->GetOrCreateCompositorFrameSinkManager()
865 ->ClaimTemporaryReference(surface_info.id()); 865 ->ClaimTemporaryReference(surface_info.id());
866 return; 866 return;
867 } 867 }
868 868
869 HandleTemporaryReferenceForNewSurface(surface_info.id(), window); 869 HandleTemporaryReferenceForNewSurface(surface_info.id(), window);
kylechar 2017/06/07 17:18:48 There is a heuristic here to find the embedder whe
kylechar 2017/06/07 17:55:15 It looks like the heuristic is broken anyways. I'l
870 870
871 if (!window->parent()) 871 // We always use the owner of the window's id (even for embedded window),
872 return; 872 // because an embedded window's id is allocated by the parent's window tree.
873 873 WindowTree* window_tree = GetTreeWithId(window->id().client_id);
874 WindowTree* window_tree = GetTreeWithId(window->parent()->id().client_id);
875 if (window_tree) 874 if (window_tree)
876 window_tree->ProcessWindowSurfaceChanged(window, surface_info); 875 window_tree->ProcessWindowSurfaceChanged(window, surface_info);
877 } 876 }
878 877
879 void WindowServer::OnActiveUserIdChanged(const UserId& previously_active_id, 878 void WindowServer::OnActiveUserIdChanged(const UserId& previously_active_id,
880 const UserId& active_id) { 879 const UserId& active_id) {
881 } 880 }
882 881
883 void WindowServer::OnUserIdAdded(const UserId& id) { 882 void WindowServer::OnUserIdAdded(const UserId& id) {
884 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); 883 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr);
885 } 884 }
886 885
887 void WindowServer::OnUserIdRemoved(const UserId& id) { 886 void WindowServer::OnUserIdRemoved(const UserId& id) {
888 activity_monitor_map_.erase(id); 887 activity_monitor_map_.erase(id);
889 } 888 }
890 889
891 } // namespace ws 890 } // namespace ws
892 } // namespace ui 891 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698