| OLD | NEW |
| 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_tree.h" | 5 #include "services/ui/ws/window_tree.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 } | 175 } |
| 176 | 176 |
| 177 DisplayManager* WindowTree::display_manager() { | 177 DisplayManager* WindowTree::display_manager() { |
| 178 return window_server_->display_manager(); | 178 return window_server_->display_manager(); |
| 179 } | 179 } |
| 180 | 180 |
| 181 const DisplayManager* WindowTree::display_manager() const { | 181 const DisplayManager* WindowTree::display_manager() const { |
| 182 return window_server_->display_manager(); | 182 return window_server_->display_manager(); |
| 183 } | 183 } |
| 184 | 184 |
| 185 void WindowTree::PrepareForWindowServerShutdown() { |
| 186 window_manager_internal_client_binding_.reset(); |
| 187 binding_->ResetClientForShutdown(); |
| 188 if (window_manager_internal_) |
| 189 window_manager_internal_ = binding_->GetWindowManager(); |
| 190 } |
| 191 |
| 185 void WindowTree::AddRootForWindowManager(const ServerWindow* root) { | 192 void WindowTree::AddRootForWindowManager(const ServerWindow* root) { |
| 186 DCHECK(window_manager_internal_); | 193 DCHECK(window_manager_internal_); |
| 187 const ClientWindowId client_window_id(WindowIdToTransportId(root->id())); | 194 const ClientWindowId client_window_id(WindowIdToTransportId(root->id())); |
| 188 DCHECK_EQ(0u, client_id_to_window_id_map_.count(client_window_id)); | 195 DCHECK_EQ(0u, client_id_to_window_id_map_.count(client_window_id)); |
| 189 client_id_to_window_id_map_[client_window_id] = root->id(); | 196 client_id_to_window_id_map_[client_window_id] = root->id(); |
| 190 window_id_to_client_id_map_[root->id()] = client_window_id; | 197 window_id_to_client_id_map_[root->id()] = client_window_id; |
| 191 roots_.insert(root); | 198 roots_.insert(root); |
| 192 | 199 |
| 193 Display* display = GetDisplay(root); | 200 Display* display = GetDisplay(root); |
| 194 DCHECK(display); | 201 DCHECK(display); |
| (...skipping 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1865 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, | 1872 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, |
| 1866 effect_bitmask, callback); | 1873 effect_bitmask, callback); |
| 1867 } | 1874 } |
| 1868 | 1875 |
| 1869 void WindowTree::PerformOnDragDropDone() { | 1876 void WindowTree::PerformOnDragDropDone() { |
| 1870 client()->OnDragDropDone(); | 1877 client()->OnDragDropDone(); |
| 1871 } | 1878 } |
| 1872 | 1879 |
| 1873 } // namespace ws | 1880 } // namespace ws |
| 1874 } // namespace ui | 1881 } // namespace ui |
| OLD | NEW |