Chromium Code Reviews| Index: ash/wm/root_window_layout_manager.cc |
| diff --git a/ash/wm/root_window_layout_manager.cc b/ash/wm/root_window_layout_manager.cc |
| index 65b71f44b9bd692ac5d99b298c92a279af889724..542bbecaf9b0e76bee0b09776027531702ca0eb4 100644 |
| --- a/ash/wm/root_window_layout_manager.cc |
| +++ b/ash/wm/root_window_layout_manager.cc |
| @@ -7,6 +7,7 @@ |
| #include "ash/desktop_background/desktop_background_widget_controller.h" |
| #include "ash/root_window_controller.h" |
| #include "ui/aura/window_event_dispatcher.h" |
| +#include "ui/aura/window_tracker.h" |
| #include "ui/compositor/layer.h" |
| #include "ui/views/widget/widget.h" |
| @@ -32,12 +33,13 @@ void RootWindowLayoutManager::OnWindowResized() { |
| // Resize both our immediate children (the containers-of-containers animated |
| // by PowerButtonController) and their children (the actual containers). |
| - aura::Window::Windows::const_iterator i; |
| - for (i = owner_->children().begin(); i != owner_->children().end(); ++i) { |
| - (*i)->SetBounds(fullscreen_bounds); |
| - aura::Window::Windows::const_iterator j; |
| - for (j = (*i)->children().begin(); j != (*i)->children().end(); ++j) |
| - (*j)->SetBounds(fullscreen_bounds); |
| + aura::WindowTracker children_tracker(owner_->children()); |
| + while (children_tracker.has_windows()) { |
| + aura::Window* child = children_tracker.Pop(); |
| + child->SetBounds(fullscreen_bounds); |
| + aura::WindowTracker grandchildren_tracker(child->children()); |
| + while (grandchildren_tracker.has_windows()) |
|
sky
2015/12/02 22:01:04
WindowTracker internally uses a set. The old code
oshima
2015/12/03 05:50:12
Good point. I changed WT to use vector instead.
|
| + grandchildren_tracker.Pop()->SetBounds(fullscreen_bounds); |
| } |
| RootWindowController* root_window_controller = |
| GetRootWindowController(owner_); |