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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 DCHECK(window_manager_internal_); | 174 DCHECK(window_manager_internal_); |
175 const ClientWindowId client_window_id(WindowIdToTransportId(root->id())); | 175 const ClientWindowId client_window_id(WindowIdToTransportId(root->id())); |
176 DCHECK_EQ(0u, client_id_to_window_id_map_.count(client_window_id)); | 176 DCHECK_EQ(0u, client_id_to_window_id_map_.count(client_window_id)); |
177 client_id_to_window_id_map_[client_window_id] = root->id(); | 177 client_id_to_window_id_map_[client_window_id] = root->id(); |
178 window_id_to_client_id_map_[root->id()] = client_window_id; | 178 window_id_to_client_id_map_[root->id()] = client_window_id; |
179 roots_.insert(root); | 179 roots_.insert(root); |
180 | 180 |
181 Display* display = GetDisplay(root); | 181 Display* display = GetDisplay(root); |
182 DCHECK(display); | 182 DCHECK(display); |
183 | 183 |
184 window_manager_internal_->WmNewDisplayAdded(display->ToMojomDisplay(), | 184 window_manager_internal_->WmNewDisplayAdded(display->ToDisplay(), |
185 WindowToWindowData(root), | 185 WindowToWindowData(root), |
186 root->parent()->IsDrawn()); | 186 root->parent()->IsDrawn()); |
187 } | 187 } |
188 | 188 |
189 void WindowTree::OnWindowDestroyingTreeImpl(WindowTree* tree) { | 189 void WindowTree::OnWindowDestroyingTreeImpl(WindowTree* tree) { |
190 if (window_manager_state_) | 190 if (window_manager_state_) |
191 window_manager_state_->OnWillDestroyTree(tree); | 191 window_manager_state_->OnWillDestroyTree(tree); |
192 | 192 |
193 if (event_source_wms_ && event_source_wms_->window_tree() == tree) | 193 if (event_source_wms_ && event_source_wms_->window_tree() == tree) |
194 event_source_wms_ = nullptr; | 194 event_source_wms_ = nullptr; |
(...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1661 } | 1661 } |
1662 | 1662 |
1663 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy( | 1663 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy( |
1664 const ServerWindow* window) const { | 1664 const ServerWindow* window) const { |
1665 WindowTree* tree = window_server_->GetTreeWithRoot(window); | 1665 WindowTree* tree = window_server_->GetTreeWithRoot(window); |
1666 return tree && tree != this; | 1666 return tree && tree != this; |
1667 } | 1667 } |
1668 | 1668 |
1669 } // namespace ws | 1669 } // namespace ws |
1670 } // namespace ui | 1670 } // namespace ui |
OLD | NEW |