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

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

Issue 2503923003: Demonstrate external-window-mode in mus-demo (Closed)
Patch Set: Determine external window mode in mus-ws based on if a WM is connected Created 4 years 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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 } 746 }
747 747
748 void WindowServer::OnGpuChannelEstablished( 748 void WindowServer::OnGpuChannelEstablished(
749 scoped_refptr<gpu::GpuChannelHost> gpu_channel) { 749 scoped_refptr<gpu::GpuChannelHost> gpu_channel) {
750 gpu_channel_ = std::move(gpu_channel); 750 gpu_channel_ = std::move(gpu_channel);
751 const std::set<Display*>& displays = display_manager()->displays(); 751 const std::set<Display*>& displays = display_manager()->displays();
752 for (auto* display : displays) 752 for (auto* display : displays)
753 display->platform_display()->OnGpuChannelEstablished(gpu_channel_); 753 display->platform_display()->OnGpuChannelEstablished(gpu_channel_);
754 // TODO(kylechar): When gpu channel is removed, this can instead happen 754 // TODO(kylechar): When gpu channel is removed, this can instead happen
755 // earlier, after GpuServiceProxy::OnInitialized(). 755 // earlier, after GpuServiceProxy::OnInitialized().
756 delegate_->StartDisplayInit(); 756 bool window_manager_connected = false;
757 for (auto* factory : window_manager_window_tree_factory_set_.GetFactories()) {
758 if (factory->window_tree()) {
759 window_manager_connected = true;
760 break;
761 }
762 }
763 delegate_->StartDisplayInit(window_manager_connected);
757 } 764 }
758 765
759 void WindowServer::OnSurfaceCreated(const cc::SurfaceId& surface_id, 766 void WindowServer::OnSurfaceCreated(const cc::SurfaceId& surface_id,
760 const gfx::Size& frame_size, 767 const gfx::Size& frame_size,
761 float device_scale_factor) { 768 float device_scale_factor) {
762 WindowId window_id( 769 WindowId window_id(
763 WindowIdFromTransportId(surface_id.frame_sink_id().client_id())); 770 WindowIdFromTransportId(surface_id.frame_sink_id().client_id()));
764 mojom::CompositorFrameSinkType compositor_frame_sink_type( 771 mojom::CompositorFrameSinkType compositor_frame_sink_type(
765 static_cast<mojom::CompositorFrameSinkType>( 772 static_cast<mojom::CompositorFrameSinkType>(
766 surface_id.frame_sink_id().sink_id())); 773 surface_id.frame_sink_id().sink_id()));
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 void WindowServer::OnUserIdAdded(const UserId& id) { 814 void WindowServer::OnUserIdAdded(const UserId& id) {
808 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); 815 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr);
809 } 816 }
810 817
811 void WindowServer::OnUserIdRemoved(const UserId& id) { 818 void WindowServer::OnUserIdRemoved(const UserId& id) {
812 activity_monitor_map_.erase(id); 819 activity_monitor_map_.erase(id);
813 } 820 }
814 821
815 } // namespace ws 822 } // namespace ws
816 } // namespace ui 823 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698