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

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

Issue 2711913006: Move FrameSink hierarchy registration to DisplayCompositor interface (Closed)
Patch Set: Fix mojom Formatting Created 3 years, 9 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/server_window_compositor_frame_sink_manager.cc ('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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 return; 631 return;
632 632
633 WindowManagerDisplayRoot* display_root = 633 WindowManagerDisplayRoot* display_root =
634 display_manager_->GetWindowManagerDisplayRoot(window); 634 display_manager_->GetWindowManagerDisplayRoot(window);
635 if (display_root) 635 if (display_root)
636 display_root->window_manager_state() 636 display_root->window_manager_state()
637 ->ReleaseCaptureBlockedByAnyModalWindow(); 637 ->ReleaseCaptureBlockedByAnyModalWindow();
638 638
639 ProcessWindowHierarchyChanged(window, new_parent, old_parent); 639 ProcessWindowHierarchyChanged(window, new_parent, old_parent);
640 640
641 if (old_parent) {
642 display_compositor_->UnregisterFrameSinkHierarchy(
643 old_parent->frame_sink_id(), window->frame_sink_id());
644 }
645 if (new_parent) {
646 display_compositor_->RegisterFrameSinkHierarchy(new_parent->frame_sink_id(),
647 window->frame_sink_id());
648 }
649
641 UpdateNativeCursorFromMouseLocation(window); 650 UpdateNativeCursorFromMouseLocation(window);
642 } 651 }
643 652
644 void WindowServer::OnWindowBoundsChanged(ServerWindow* window, 653 void WindowServer::OnWindowBoundsChanged(ServerWindow* window,
645 const gfx::Rect& old_bounds, 654 const gfx::Rect& old_bounds,
646 const gfx::Rect& new_bounds) { 655 const gfx::Rect& new_bounds) {
647 if (in_destructor_) 656 if (in_destructor_)
648 return; 657 return;
649 658
650 ProcessWindowBoundsChanged(window, old_bounds, new_bounds); 659 ProcessWindowBoundsChanged(window, old_bounds, new_bounds);
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 void WindowServer::OnUserIdAdded(const UserId& id) { 811 void WindowServer::OnUserIdAdded(const UserId& id) {
803 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); 812 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr);
804 } 813 }
805 814
806 void WindowServer::OnUserIdRemoved(const UserId& id) { 815 void WindowServer::OnUserIdRemoved(const UserId& id) {
807 activity_monitor_map_.erase(id); 816 activity_monitor_map_.erase(id);
808 } 817 }
809 818
810 } // namespace ws 819 } // namespace ws
811 } // namespace ui 820 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/server_window_compositor_frame_sink_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698