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

Unified Diff: ash/root_window_controller.cc

Issue 2699033002: Replace WmWindowObserver with aura::WindowObserver. (Closed)
Patch Set: Check for null images in ShelfWindowWatcher. Created 3 years, 10 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 | « ash/display/screen_orientation_controller_chromeos.cc ('k') | ash/shelf/shelf_window_targeter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 953c520f9bf02280efe1a9793e30abc3a0cebc94..be538ba54484eb94cc4a183971ce60ef03bfda59 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -597,22 +597,22 @@ void RootWindowController::CloseChildWindows() {
// Explicitly destroy top level windows. We do this because such windows may
// query the RootWindow for state.
- WmWindowTracker non_toplevel_windows;
+ aura::WindowTracker non_toplevel_windows;
WmWindow* root = GetWindow();
- non_toplevel_windows.Add(root);
+ non_toplevel_windows.Add(root->aura_window());
while (!non_toplevel_windows.windows().empty()) {
- WmWindow* non_toplevel_window = non_toplevel_windows.Pop();
- WmWindowTracker toplevel_windows;
- for (WmWindow* child : non_toplevel_window->GetChildren()) {
- if (!ShouldDestroyWindowInCloseChildWindows(child))
+ aura::Window* non_toplevel_window = non_toplevel_windows.Pop();
+ aura::WindowTracker toplevel_windows;
+ for (aura::Window* child : non_toplevel_window->children()) {
+ if (!ShouldDestroyWindowInCloseChildWindows(WmWindow::Get(child)))
continue;
- if (child->HasNonClientArea())
+ if (child->delegate())
toplevel_windows.Add(child);
else
non_toplevel_windows.Add(child);
}
while (!toplevel_windows.windows().empty())
- toplevel_windows.Pop()->Destroy();
+ delete toplevel_windows.Pop();
}
// And then remove the containers.
while (!root->GetChildren().empty()) {
« no previous file with comments | « ash/display/screen_orientation_controller_chromeos.cc ('k') | ash/shelf/shelf_window_targeter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698