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

Unified Diff: ash/shell.cc

Issue 1614233002: Shutdown the status tray before the system tray delegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 4 years, 11 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
« ash/root_window_controller.cc ('K') | « ash/shell.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 7c36c8ef48c7c5490940813466a39ebad3366d2d..5ab5939c8f5bb9078238bc41a234479e6fa51067 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -476,6 +476,15 @@ void Shell::ShowShelf() {
(*iter)->ShowShelf();
}
+void Shell::HideShelf() {
+ RootWindowControllerList controllers = GetAllRootWindowControllers();
+ for (RootWindowControllerList::iterator iter = controllers.begin();
+ iter != controllers.end(); ++iter) {
+ if ((*iter)->shelf())
+ (*iter)->shelf()->ShutdownStatusAreaWidget();
+ }
+}
+
void Shell::AddShellObserver(ShellObserver* observer) {
observers_.AddObserver(observer);
}
@@ -720,7 +729,9 @@ Shell::~Shell() {
logout_confirmation_controller_.reset();
#endif
- // Destroy SystemTrayDelegate before destroying the status area(s).
+ // Destroy SystemTrayDelegate before destroying the status area(s). Make sure
+ // to deinitialize the shelf first, as it is initialized after the delegate.
+ HideShelf();
system_tray_delegate_->Shutdown();
system_tray_delegate_.reset();
« ash/root_window_controller.cc ('K') | « ash/shell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698