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

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

Issue 675053002: Move ContentsView::NamedPage to AppListModel::ShowState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/ares_move_search_box_up
Patch Set: rebase Created 6 years, 2 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/app_list_model.h ('k') | ui/app_list/views/app_list_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8cadbdac73d469dc4999b0fc1dbc77140f45fade..7ed229c53a441bc3fe7c4bd049170a370c94676b 100644
--- a/ui/app_list/views/app_list_main_view.cc
+++ b/ui/app_list/views/app_list_main_view.cc
@@ -114,7 +114,7 @@ void AppListMainView::AddContentsViews() {
contents_switcher_view_ = new ContentsSwitcherView(contents_view_);
contents_view_->SetContentsSwitcherView(contents_switcher_view_);
}
- contents_view_->InitNamedPages(model_, delegate_);
+ contents_view_->Init(model_, delegate_);
AddChildView(contents_view_);
if (contents_switcher_view_)
AddChildView(contents_switcher_view_);
@@ -147,8 +147,8 @@ void AppListMainView::ShowAppListWhenReady() {
void AppListMainView::ResetForShow() {
if (switches::IsExperimentalAppListEnabled()) {
- contents_view_->SetActivePage(contents_view_->GetPageIndexForNamedPage(
- ContentsView::NAMED_PAGE_START));
+ contents_view_->SetActivePage(
+ contents_view_->GetPageIndexForState(AppListModel::STATE_START));
}
contents_view_->apps_container_view()->ResetForShowApps();
// We clear the search when hiding so when app list appears it is not showing
@@ -180,9 +180,8 @@ void AppListMainView::ModelChanged() {
}
void AppListMainView::UpdateSearchBoxVisibility() {
- bool visible =
- !contents_view_->IsNamedPageActive(ContentsView::NAMED_PAGE_START) ||
- contents_view_->IsShowingSearchResults();
+ bool visible = !contents_view_->IsStateActive(AppListModel::STATE_START) ||
+ contents_view_->IsShowingSearchResults();
search_box_view_->SetVisible(visible);
if (visible && GetWidget() && GetWidget()->IsVisible())
search_box_view_->search_box()->RequestFocus();
« no previous file with comments | « ui/app_list/app_list_model.h ('k') | ui/app_list/views/app_list_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698