| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/modal_window_controller.h" | 5 #include "services/ui/ws/modal_window_controller.h" |
| 6 | 6 |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "components/mus/ws/event_dispatcher.h" | 8 #include "services/ui/ws/event_dispatcher.h" |
| 9 #include "components/mus/ws/server_window.h" | 9 #include "services/ui/ws/server_window.h" |
| 10 #include "components/mus/ws/server_window_drawn_tracker.h" | 10 #include "services/ui/ws/server_window_drawn_tracker.h" |
| 11 | 11 |
| 12 namespace mus { | 12 namespace mus { |
| 13 namespace ws { | 13 namespace ws { |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 const ServerWindow* GetModalChildForWindowAncestor(const ServerWindow* window) { | 16 const ServerWindow* GetModalChildForWindowAncestor(const ServerWindow* window) { |
| 17 for (const ServerWindow* ancestor = window; ancestor; | 17 for (const ServerWindow* ancestor = window; ancestor; |
| 18 ancestor = ancestor->parent()) { | 18 ancestor = ancestor->parent()) { |
| 19 for (const auto& transient_child : ancestor->transient_children()) { | 19 for (const auto& transient_child : ancestor->transient_children()) { |
| 20 if (transient_child->is_modal() && transient_child->IsDrawn()) | 20 if (transient_child->is_modal() && transient_child->IsDrawn()) |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 // Move the most recently shown window to the end of the list. | 112 // Move the most recently shown window to the end of the list. |
| 113 auto it = std::find(system_modal_windows_.begin(), | 113 auto it = std::find(system_modal_windows_.begin(), |
| 114 system_modal_windows_.end(), window); | 114 system_modal_windows_.end(), window); |
| 115 DCHECK(it != system_modal_windows_.end()); | 115 DCHECK(it != system_modal_windows_.end()); |
| 116 system_modal_windows_.splice(system_modal_windows_.end(), | 116 system_modal_windows_.splice(system_modal_windows_.end(), |
| 117 system_modal_windows_, it); | 117 system_modal_windows_, it); |
| 118 } | 118 } |
| 119 | 119 |
| 120 } // namespace ws | 120 } // namespace ws |
| 121 } // namespace mus | 121 } // namespace mus |
| OLD | NEW |