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

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

Issue 2875753002: Implement aura::WindowPortMus::CreateCompositorFrameSink() (Closed)
Patch Set: WIP Created 3 years, 7 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
« no previous file with comments | « no previous file | services/ui/ws/window_tree.cc » ('j') | services/ui/ws/window_tree.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 // part of a WindowTree. Send the SurfaceId directly to FrameGenerator and 847 // part of a WindowTree. Send the SurfaceId directly to FrameGenerator and
848 // claim the temporary reference for the display root. 848 // claim the temporary reference for the display root.
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);
Fady Samuel 2017/05/18 20:02:01 This breaks right? If the embedder is top most (As
Peng 2017/05/18 20:50:59 I tested it with mushrome, mustash, and mustash +
Fady Samuel 2017/05/18 20:56:22 Do we assign an owner to the temporary reference?
Peng 2017/05/23 18:00:42 Done.
858 858
859 if (!window->parent()) 859 ClientSpecificId window_tree_id = window->id().client_id;
860 return; 860 // If the window has a parent, we should use the parent's tree, because the
861 // window could be an embedded window, and the window will be in both
862 // the embedder's tree and embeddee's tree, in this case we shold notify
863 // the embedder's tree about the surface change.
864 if (window->parent())
865 window_tree_id = window->parent()->id().client_id;
861 866
862 WindowTree* window_tree = GetTreeWithId(window->parent()->id().client_id); 867 WindowTree* window_tree = GetTreeWithId(window_tree_id);
863 if (window_tree) 868 if (window_tree)
864 window_tree->ProcessWindowSurfaceChanged(window, surface_info); 869 window_tree->ProcessWindowSurfaceChanged(window, surface_info);
865 } 870 }
866 871
867 void WindowServer::OnActiveUserIdChanged(const UserId& previously_active_id, 872 void WindowServer::OnActiveUserIdChanged(const UserId& previously_active_id,
868 const UserId& active_id) { 873 const UserId& active_id) {
869 } 874 }
870 875
871 void WindowServer::OnUserIdAdded(const UserId& id) { 876 void WindowServer::OnUserIdAdded(const UserId& id) {
872 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); 877 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr);
873 } 878 }
874 879
875 void WindowServer::OnUserIdRemoved(const UserId& id) { 880 void WindowServer::OnUserIdRemoved(const UserId& id) {
876 activity_monitor_map_.erase(id); 881 activity_monitor_map_.erase(id);
877 } 882 }
878 883
879 } // namespace ws 884 } // namespace ws
880 } // namespace ui 885 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | services/ui/ws/window_tree.cc » ('j') | services/ui/ws/window_tree.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698