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

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

Issue 2951903004: Added back button when in folder view. (Closed)
Patch Set: Addressed comments and cached the feature flag. 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
« no previous file with comments | « ui/app_list/views/contents_view.h ('k') | ui/app_list/views/search_box_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..7f09a8030640eb4515a0b29d0b30267d0f8682e8 100644
--- a/ui/app_list/views/contents_view.cc
+++ b/ui/app_list/views/contents_view.cc
@@ -38,7 +38,8 @@ ContentsView::ContentsView(AppListMainView* app_list_main_view,
custom_page_view_(nullptr),
app_list_main_view_(app_list_main_view),
app_list_view_(app_list_view),
- page_before_search_(0) {
+ page_before_search_(0),
+ is_fullscreen_app_list_enabled_(features::IsFullscreenAppListEnabled()) {
pagination_model_.SetTransitionDurations(kPageTransitionDurationInMs,
kOverscrollPageTransitionDurationMs);
pagination_model_.AddObserver(this);
@@ -210,13 +211,13 @@ void ContentsView::ActivePageChanged() {
DCHECK(start_page_view_);
// Set the visibility of the search box's back button.
- if (!features::IsFullscreenAppListEnabled()) {
+ const bool folder_active = state == AppListModel::STATE_APPS &&
+ apps_container_view_->IsInFolderView();
+
+ if (!is_fullscreen_app_list_enabled_) {
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);
}
« no previous file with comments | « ui/app_list/views/contents_view.h ('k') | ui/app_list/views/search_box_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698