Chromium Code Reviews| Index: ui/wm/core/transient_window_manager.cc |
| diff --git a/ui/wm/core/transient_window_manager.cc b/ui/wm/core/transient_window_manager.cc |
| index 2ca145d2420dbdd9f9a2fc81fd785e8e64d7a495..27f1afe1db3c897736781d13a421fe64f66ce1c6 100644 |
| --- a/ui/wm/core/transient_window_manager.cc |
| +++ b/ui/wm/core/transient_window_manager.cc |
| @@ -11,6 +11,7 @@ |
| #include "base/stl_util.h" |
| #include "ui/aura/window.h" |
| #include "ui/aura/window_property.h" |
| +#include "ui/aura/window_tracker.h" |
| #include "ui/wm/core/transient_window_observer.h" |
| #include "ui/wm/core/transient_window_stacking_client.h" |
| #include "ui/wm/core/window_util.h" |
| @@ -162,8 +163,15 @@ void TransientWindowManager::OnWindowVisibilityChanged(Window* window, |
| // If the window has transient children, updates the transient children's |
| // visiblity as well. |
| + aura::WindowTracker tracker; |
|
sky
2015/11/22 15:24:16
Add a comment as to why you use WindowTracker.
|
| for (Window* child : transient_children_) |
| - Get(child)->UpdateTransientChildVisibility(visible); |
| + tracker.Add(child); |
| + |
| + while (!tracker.windows().empty()) { |
| + Window* window = *(tracker.windows().begin()); |
| + Get(window)->UpdateTransientChildVisibility(visible); |
| + tracker.Remove(window); |
| + } |
| // Remember the show request in |show_on_parent_visible_| and hide it again |
| // if the following conditions are met |