Chromium Code Reviews| 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 "components/mus/ws/window_tree_impl.h" | 5 #include "components/mus/ws/window_tree_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 402 client_->OnWindowHierarchyChanged( | 402 client_->OnWindowHierarchyChanged( |
| 403 MapWindowIdToClient(window), MapWindowIdToClient(new_parent_id), | 403 MapWindowIdToClient(window), MapWindowIdToClient(new_parent_id), |
| 404 MapWindowIdToClient(old_parent_id), WindowsToWindowDatas(to_send)); | 404 MapWindowIdToClient(old_parent_id), WindowsToWindowDatas(to_send)); |
| 405 connection_manager_->OnConnectionMessagedClient(id_); | 405 connection_manager_->OnConnectionMessagedClient(id_); |
| 406 } | 406 } |
| 407 | 407 |
| 408 void WindowTreeImpl::ProcessWindowReorder(const ServerWindow* window, | 408 void WindowTreeImpl::ProcessWindowReorder(const ServerWindow* window, |
| 409 const ServerWindow* relative_window, | 409 const ServerWindow* relative_window, |
| 410 mojom::OrderDirection direction, | 410 mojom::OrderDirection direction, |
| 411 bool originated_change) { | 411 bool originated_change) { |
| 412 DCHECK_EQ(window->parent(), relative_window->parent()); | |
| 412 if (originated_change || !IsWindowKnown(window) || | 413 if (originated_change || !IsWindowKnown(window) || |
| 413 !IsWindowKnown(relative_window) || | 414 !IsWindowKnown(relative_window) || |
| 414 connection_manager_->DidConnectionMessageClient(id_)) | 415 connection_manager_->DidConnectionMessageClient(id_)) |
| 415 return; | 416 return; |
| 416 | 417 |
| 418 // Do not notify ordering changes of the root windows. | |
|
sky
2016/01/12 22:36:08
Document why. If window or relative_window is a ro
sadrul
2016/01/13 02:26:05
Done.
| |
| 419 if (HasRoot(window) || HasRoot(relative_window)) | |
| 420 return; | |
| 421 | |
| 417 client_->OnWindowReordered(MapWindowIdToClient(window), | 422 client_->OnWindowReordered(MapWindowIdToClient(window), |
| 418 MapWindowIdToClient(relative_window), direction); | 423 MapWindowIdToClient(relative_window), direction); |
| 419 connection_manager_->OnConnectionMessagedClient(id_); | 424 connection_manager_->OnConnectionMessagedClient(id_); |
| 420 } | 425 } |
| 421 | 426 |
| 422 void WindowTreeImpl::ProcessWindowDeleted(const ServerWindow* window, | 427 void WindowTreeImpl::ProcessWindowDeleted(const ServerWindow* window, |
| 423 bool originated_change) { | 428 bool originated_change) { |
| 424 if (window->id().connection_id == id_) | 429 if (window->id().connection_id == id_) |
| 425 window_map_.erase(window->id().window_id); | 430 window_map_.erase(window->id().window_id); |
| 426 | 431 |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1151 | 1156 |
| 1152 for (const auto* root : roots_) { | 1157 for (const auto* root : roots_) { |
| 1153 if (root->Contains(window)) | 1158 if (root->Contains(window)) |
| 1154 return true; | 1159 return true; |
| 1155 } | 1160 } |
| 1156 return false; | 1161 return false; |
| 1157 } | 1162 } |
| 1158 | 1163 |
| 1159 } // namespace ws | 1164 } // namespace ws |
| 1160 } // namespace mus | 1165 } // namespace mus |
| OLD | NEW |