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

Unified Diff: ui/views/widget/native_widget_aura.cc

Issue 588113002: Change Widget::GetAllOwnedWidgets to return child widgets as well (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@aid_resilient_to_uninstall_and_profile_changes
Patch Set: Made GetAllOwnedWidgets return child windows as well Created 6 years, 3 months 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 | « chrome/browser/ui/app_list/app_list_service_views_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 41a58c5fbb5aee9b23bc20317698fb6e52a09741..00db05bd2764520e8a8ac2de8f1ce574fa6e701d 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -1105,6 +1105,7 @@ void NativeWidgetPrivate::GetAllChildWidgets(gfx::NativeView native_view,
// static
void NativeWidgetPrivate::GetAllOwnedWidgets(gfx::NativeView native_view,
tapted 2014/10/15 23:59:24 you'll need to update the comment in widget.h htt
sashab 2014/10/20 03:03:00 Done to just remove 'non-child'. Didn't think I ne
Widget::Widgets* owned) {
+ // Add all owned widgets.
const aura::Window::Windows& transient_children =
wm::GetTransientChildren(native_view);
for (aura::Window::Windows::const_iterator i = transient_children.begin();
@@ -1115,6 +1116,14 @@ void NativeWidgetPrivate::GetAllOwnedWidgets(gfx::NativeView native_view,
owned->insert(native_widget->GetWidget());
GetAllOwnedWidgets((*i), owned);
}
+
+ // Add all owned windows.
tapted 2014/10/15 23:59:24 owned windows -> child windows
sashab 2014/10/20 03:03:00 Done.
+ const aura::Window::Windows& child_windows = native_view->children();
+ for (aura::Window::Windows::const_iterator i = child_windows.begin();
tapted 2014/10/15 23:59:24 might as well start using C++11. Pretty sure this
sashab 2014/10/20 03:03:00 Done. Git cl format wants to change "x->y()" to "x
+ i != child_windows.end();
+ ++i) {
+ GetAllChildWidgets((*i), owned);
+ }
}
// static
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_views_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698