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

Unified Diff: ash/root_window_controller.cc

Issue 2321763002: Moves some shutdown related code to earlier on in function (Closed)
Patch Set: move to end Created 4 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 | « no previous file | no next file » | 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 2051fc13d3917c19ff467d5654b704bc209f1c0a..0154b0cd9cfaa7692013b4691a0a6895a4ec2965 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -560,9 +560,6 @@ void RootWindowController::CloseChildWindows() {
docked_layout_manager_->Shutdown();
docked_layout_manager_ = NULL;
}
- aura::Window* root_window = GetRootWindow();
- aura::client::SetDragDropClient(root_window, NULL);
-
wm_shelf_aura_->ShutdownShelfWidget();
// Close wallpaper widget first as it depends on tooltip.
@@ -570,10 +567,10 @@ void RootWindowController::CloseChildWindows() {
animating_wallpaper_widget_controller_.reset();
wm_root_window_controller_->DeleteWorkspaceController();
- aura::client::SetTooltipClient(root_window, NULL);
// Explicitly destroy top level windows. We do this as during part of
// destruction such windows may query the RootWindow for state.
+ aura::Window* root_window = GetRootWindow();
aura::WindowTracker non_toplevel_windows;
non_toplevel_windows.Add(root_window);
while (!non_toplevel_windows.windows().empty()) {
@@ -609,6 +606,9 @@ void RootWindowController::CloseChildWindows() {
// Avoid notifying WmShelf that the shelf has been destroyed twice.
if (wm_shelf_aura_->IsShelfInitialized())
wm_shelf_aura_->ShutdownShelf();
+
+ aura::client::SetDragDropClient(root_window, nullptr);
+ aura::client::SetTooltipClient(root_window, nullptr);
}
void RootWindowController::MoveWindowsTo(aura::Window* dst) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698