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

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

Issue 2400723003: Mus+Ash: Use standard cc mechanism for surface lifetime. (Closed)
Patch Set: Only AddObserver once Created 4 years, 2 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 | « services/ui/ws/window_server.h ('k') | no next file » | no next file with comments »
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 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 if (!window_paint_callback_.is_null()) 616 if (!window_paint_callback_.is_null())
617 window_paint_callback_.Run(window); 617 window_paint_callback_.Run(window);
618 } 618 }
619 619
620 const ServerWindow* WindowServer::GetRootWindow( 620 const ServerWindow* WindowServer::GetRootWindow(
621 const ServerWindow* window) const { 621 const ServerWindow* window) const {
622 const Display* display = display_manager_->GetDisplayContaining(window); 622 const Display* display = display_manager_->GetDisplayContaining(window);
623 return display ? display->root_window() : nullptr; 623 return display ? display->root_window() : nullptr;
624 } 624 }
625 625
626 void WindowServer::ScheduleSurfaceDestruction(ServerWindow* window) {
627 Display* display = display_manager_->GetDisplayContaining(window);
628 if (display)
629 display->ScheduleSurfaceDestruction(window);
630 }
631
632 void WindowServer::OnWindowDestroyed(ServerWindow* window) { 626 void WindowServer::OnWindowDestroyed(ServerWindow* window) {
633 ProcessWindowDeleted(window); 627 ProcessWindowDeleted(window);
634 } 628 }
635 629
636 void WindowServer::OnWillChangeWindowHierarchy(ServerWindow* window, 630 void WindowServer::OnWillChangeWindowHierarchy(ServerWindow* window,
637 ServerWindow* new_parent, 631 ServerWindow* new_parent,
638 ServerWindow* old_parent) { 632 ServerWindow* old_parent) {
639 if (in_destructor_) 633 if (in_destructor_)
640 return; 634 return;
641 635
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 void WindowServer::OnUserIdAdded(const UserId& id) { 813 void WindowServer::OnUserIdAdded(const UserId& id) {
820 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); 814 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr);
821 } 815 }
822 816
823 void WindowServer::OnUserIdRemoved(const UserId& id) { 817 void WindowServer::OnUserIdRemoved(const UserId& id) {
824 activity_monitor_map_.erase(id); 818 activity_monitor_map_.erase(id);
825 } 819 }
826 820
827 } // namespace ws 821 } // namespace ws
828 } // namespace ui 822 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/window_server.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698