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

Unified Diff: ash/shelf/shelf_widget.cc

Issue 2000393003: ash: Reorder shutdown of ShelfLayoutManager and StatusAreaWidget (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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
Index: ash/shelf/shelf_widget.cc
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc
index 216b0901d32855775fe45832886cfcc803346162..601cecdfc73ed72ca7806716a6b4508f651afc02 100644
--- a/ash/shelf/shelf_widget.cc
+++ b/ash/shelf/shelf_widget.cc
@@ -751,12 +751,17 @@ FocusCycler* ShelfWidget::GetFocusCycler() {
return delegate_view_->focus_cycler();
}
-void ShelfWidget::ShutdownStatusAreaWidget() {
+void ShelfWidget::Shutdown() {
+ // Shutting down the status area widget may cause other widgets (e.g. bubbles)
+ // to close, so uninstall the ShelfLayoutManager event filters first.
+ if (shelf_layout_manager_)
+ shelf_layout_manager_->PrepareForShutdown();
oshima 2016/05/24 20:49:10 can you also add comment why we shouldn't remove t
James Cook 2016/05/24 21:18:14 Good catch! Actually, if we reset the shelf_layout
+
if (status_area_widget_) {
Shell::GetInstance()->focus_cycler()->RemoveWidget(status_area_widget_);
status_area_widget_->Shutdown();
+ status_area_widget_ = nullptr;
}
- status_area_widget_ = NULL;
}
void ShelfWidget::ForceUndimming(bool force) {
« ash/shelf/shelf_layout_manager.cc ('K') | « ash/shelf/shelf_widget.h ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698