Chromium Code Reviews| Index: ui/views/widget/native_widget_aura.cc |
| diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc |
| index 28893559798560c5f228f0e2d2dca31cf1cd7316..939a093463ec46a5443085078fb23526c3abc71a 100644 |
| --- a/ui/views/widget/native_widget_aura.cc |
| +++ b/ui/views/widget/native_widget_aura.cc |
| @@ -1107,16 +1107,18 @@ void NativeWidgetPrivate::GetAllChildWidgets(gfx::NativeView native_view, |
| // static |
| void NativeWidgetPrivate::GetAllOwnedWidgets(gfx::NativeView native_view, |
| Widget::Widgets* owned) { |
| - const aura::Window::Windows& transient_children = |
| - wm::GetTransientChildren(native_view); |
| - for (aura::Window::Windows::const_iterator i = transient_children.begin(); |
| - i != transient_children.end(); ++i) { |
| + // Add all owned widgets. |
| + for (const auto& transient_child : wm::GetTransientChildren(native_view)) { |
|
sky
2014/10/22 00:11:34
nit: IMO if it were me I would change auto to aura
sashab
2014/10/23 00:33:30
Done.
|
| NativeWidgetPrivate* native_widget = static_cast<NativeWidgetPrivate*>( |
| - GetNativeWidgetForNativeView(*i)); |
| + GetNativeWidgetForNativeView(transient_child)); |
| if (native_widget && native_widget->GetWidget()) |
| owned->insert(native_widget->GetWidget()); |
| - GetAllOwnedWidgets((*i), owned); |
| + GetAllOwnedWidgets(transient_child, owned); |
| } |
| + |
| + // Add all child windows. |
| + for (const auto& child : native_view->children()) |
| + GetAllChildWidgets(child, owned); |
| } |
| // static |