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

Unified Diff: ui/app_list/views/app_list_main_view.cc

Issue 1003393002: After uninstall, remove last item in Launcher folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move work from views to model, as per reviewer comment Created 5 years, 9 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: 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)
« ui/app_list/app_list_model_unittest.cc ('K') | « ui/app_list/views/app_list_main_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698