Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(460)

Unified Diff: ui/wm/core/transient_window_manager.cc

Issue 1484383003: Use WindowTracker when resizing root window as it may delete other window in unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/window_tracker.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f9d723fb0af05f4b1281eef11532ce655e0f5d9c..e5f6232d4929aebc25dfac18268441b9126ce6ad 100644
--- a/ui/wm/core/transient_window_manager.cc
+++ b/ui/wm/core/transient_window_manager.cc
@@ -165,15 +165,9 @@ void TransientWindowManager::OnWindowVisibilityChanged(Window* window,
// visiblity as well.
// WindowTracker is used because child window
// could be deleted inside UpdateTransientChildVisibility call.
- aura::WindowTracker tracker;
- for (Window* child : transient_children_)
- tracker.Add(child);
-
- while (!tracker.windows().empty()) {
- Window* window = *(tracker.windows().begin());
- Get(window)->UpdateTransientChildVisibility(visible);
- tracker.Remove(window);
- }
+ aura::WindowTracker tracker(transient_children_);
+ while (tracker.has_windows())
+ Get(tracker.Pop())->UpdateTransientChildVisibility(visible);
// Remember the show request in |show_on_parent_visible_| and hide it again
// if the following conditions are met
« no previous file with comments | « ui/aura/window_tracker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698