Chromium Code Reviews| Index: ui/app_list/views/app_list_main_view.cc |
| diff --git a/ui/app_list/views/app_list_main_view.cc b/ui/app_list/views/app_list_main_view.cc |
| index dceae0faa72d4f49bddc4e827b990d5bc0c64783..0374d436fe0d88ba2345b1b6f99ff858ec15bf4d 100644 |
| --- a/ui/app_list/views/app_list_main_view.cc |
| +++ b/ui/app_list/views/app_list_main_view.cc |
| @@ -266,6 +266,15 @@ void AppListMainView::UpdateCustomLauncherPageVisibility() { |
| } |
| } |
| +// Removes AppItemList from folder's AppsGridView before the folder is deleted. |
| +void AppListMainView::OnSingleItemFolderWillBeDeleted() { |
| + AppsGridView* folder_grid_view = contents_view_->apps_container_view() |
| + ->app_list_folder_view() |
| + ->items_grid_view(); |
| + if (folder_grid_view) |
| + folder_grid_view->SetItemList(nullptr); // removes observer |
| +} |
|
Greg Levin
2015/03/25 21:58:16
This seems like a slightly awkward way to get this
stevenjb
2015/03/25 22:24:01
This is indeed very awkward. It's also unclear to
Greg Levin
2015/03/26 19:45:11
Done? I'm still calling SetItemList(nullptr), bec
|
| + |
| void AppListMainView::OnCustomLauncherPageEnabledStateChanged(bool enabled) { |
| views::View* custom_page = contents_view_->custom_page_view(); |
| if (!custom_page) |