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

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

Issue 2691393002: Fix auto raw pointer deduction on linux (Closed)
Patch Set: update Created 3 years, 10 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 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 return; 779 return;
780 780
781 // Cache the last submitted surface ID in the window server. 781 // Cache the last submitted surface ID in the window server.
782 // DisplayCompositorFrameSink may submit a CompositorFrame without 782 // DisplayCompositorFrameSink may submit a CompositorFrame without
783 // creating a CompositorFrameSinkManager. 783 // creating a CompositorFrameSinkManager.
784 window->GetOrCreateCompositorFrameSinkManager()->SetLatestSurfaceInfo( 784 window->GetOrCreateCompositorFrameSinkManager()->SetLatestSurfaceInfo(
785 surface_info); 785 surface_info);
786 786
787 // FrameGenerator will add an appropriate reference for the new surface. 787 // FrameGenerator will add an appropriate reference for the new surface.
788 DCHECK(display_manager_->GetDisplayContaining(window)); 788 DCHECK(display_manager_->GetDisplayContaining(window));
789 auto display = display_manager_->GetDisplayContaining(window); 789 auto* display = display_manager_->GetDisplayContaining(window);
790 if (window == display->GetActiveRootWindow()) { 790 if (window == display->GetActiveRootWindow()) {
791 display->platform_display()->GetFrameGenerator()->OnSurfaceCreated( 791 display->platform_display()->GetFrameGenerator()->OnSurfaceCreated(
792 surface_info); 792 surface_info);
793 } 793 }
794 794
795 // This is only used for testing to observe that a window has a 795 // This is only used for testing to observe that a window has a
796 // CompositorFrame. 796 // CompositorFrame.
797 if (!window_paint_callback_.is_null()) 797 if (!window_paint_callback_.is_null())
798 window_paint_callback_.Run(window); 798 window_paint_callback_.Run(window);
799 799
(...skipping 12 matching lines...) Expand all
812 void WindowServer::OnUserIdAdded(const UserId& id) { 812 void WindowServer::OnUserIdAdded(const UserId& id) {
813 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); 813 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr);
814 } 814 }
815 815
816 void WindowServer::OnUserIdRemoved(const UserId& id) { 816 void WindowServer::OnUserIdRemoved(const UserId& id) {
817 activity_monitor_map_.erase(id); 817 activity_monitor_map_.erase(id);
818 } 818 }
819 819
820 } // namespace ws 820 } // namespace ws
821 } // namespace ui 821 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698