Chromium Code Reviews| 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) { |