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

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

Issue 2875753002: Implement aura::WindowPortMus::CreateCompositorFrameSink() (Closed)
Patch Set: Fix unittests 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 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 display->platform_display()->GetFrameGenerator()->OnSurfaceCreated( 849 display->platform_display()->GetFrameGenerator()->OnSurfaceCreated(
850 surface_info); 850 surface_info);
851 display->root_window() 851 display->root_window()
852 ->GetOrCreateCompositorFrameSinkManager() 852 ->GetOrCreateCompositorFrameSinkManager()
853 ->ClaimTemporaryReference(surface_info.id()); 853 ->ClaimTemporaryReference(surface_info.id());
854 return; 854 return;
855 } 855 }
856 856
857 HandleTemporaryReferenceForNewSurface(surface_info.id(), window); 857 HandleTemporaryReferenceForNewSurface(surface_info.id(), window);
858 858
859 if (!window->parent()) 859 // We always use the client_id of window's id (even for embedded window),
sky 2017/05/26 23:14:18 How about, 'We always use the owner of the window.
Peng 2017/05/30 19:46:27 Done.
860 return; 860 // because an embedded window's id is allocated by the parent's window tree.
861 861 WindowTree* window_tree = GetTreeWithId(window->id().client_id);
862 WindowTree* window_tree = GetTreeWithId(window->parent()->id().client_id);
863 if (window_tree) 862 if (window_tree)
864 window_tree->ProcessWindowSurfaceChanged(window, surface_info); 863 window_tree->ProcessWindowSurfaceChanged(window, surface_info);
865 } 864 }
866 865
867 void WindowServer::OnActiveUserIdChanged(const UserId& previously_active_id, 866 void WindowServer::OnActiveUserIdChanged(const UserId& previously_active_id,
868 const UserId& active_id) { 867 const UserId& active_id) {
869 } 868 }
870 869
871 void WindowServer::OnUserIdAdded(const UserId& id) { 870 void WindowServer::OnUserIdAdded(const UserId& id) {
872 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); 871 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr);
873 } 872 }
874 873
875 void WindowServer::OnUserIdRemoved(const UserId& id) { 874 void WindowServer::OnUserIdRemoved(const UserId& id) {
876 activity_monitor_map_.erase(id); 875 activity_monitor_map_.erase(id);
877 } 876 }
878 877
879 } // namespace ws 878 } // namespace ws
880 } // namespace ui 879 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698