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

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

Issue 2951903004: Added back button when in folder view. (Closed)
Patch Set: Created 3 years, 6 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/contents_view.cc
diff --git a/ui/app_list/views/contents_view.cc b/ui/app_list/views/contents_view.cc
index 8508e1069bfffad98ad70913d0a6cd373a309193..7f258425da92d7fef9785792f43272173b1f92ce 100644
--- a/ui/app_list/views/contents_view.cc
+++ b/ui/app_list/views/contents_view.cc
@@ -210,14 +210,18 @@ void ContentsView::ActivePageChanged() {
DCHECK(start_page_view_);
// Set the visibility of the search box's back button.
+ bool folder_active = (state == AppListModel::STATE_APPS)
vadimt 2017/06/22 00:36:12 state == AppListModel::STATE_APPS &&
newcomer 2017/06/22 16:49:06 Done.
+ ? apps_container_view_->IsInFolderView()
+ : false;
if (!features::IsFullscreenAppListEnabled()) {
app_list_main_view_->search_box_view()->back_button()->SetVisible(
state != AppListModel::STATE_START);
app_list_main_view_->search_box_view()->Layout();
- bool folder_active = (state == AppListModel::STATE_APPS)
- ? apps_container_view_->IsInFolderView()
- : false;
app_list_main_view_->search_box_view()->SetBackButtonLabel(folder_active);
+ } else {
+ if (app_list_main_view()->Contains(app_list_main_view()->search_box_view()))
+ app_list_main_view_->search_box_view()->SwapGoogleIconWithBackButton(
vadimt 2017/06/22 00:36:12 {}
newcomer 2017/06/22 16:49:06 Done.
+ folder_active);
}
// Whenever the page changes, the custom launcher page is considered to have

Powered by Google App Engine
This is Rietveld 408576698