Chromium Code Reviews| Index: ash/shell.cc |
| diff --git a/ash/shell.cc b/ash/shell.cc |
| index 192d9d72beb66aea64bc200c3a07837e98b665ad..dfcf859f20412d90012b886ed6bfbfe3a77bc9d9 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 |
|
oshima
2016/01/09 01:05:11
The original comment should go after HideShelf. Hi
jdufault
2016/01/11 20:59:34
Calling (*iter)->GetSystemTray()->CloseSystemBubbl
|
| + // to deinitialize the shelf first, as it is initialized after the delegate. |
| + HideShelf(); |
| system_tray_delegate_->Shutdown(); |
| system_tray_delegate_.reset(); |