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

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

Issue 947903002: Change ContentsView::SetActivePage to use States rather than indexes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more_rebase 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
« no previous file with comments | « ui/app_list/views/all_apps_tile_item_view.cc ('k') | ui/app_list/views/app_list_main_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 02690dcd951aca64b8f3c29c007520cca3f82d57..aa45d63b5df67004a55947bafe2544b38788cf0e 100644
--- a/ui/app_list/views/app_list_main_view.cc
+++ b/ui/app_list/views/app_list_main_view.cc
@@ -144,10 +144,9 @@ void AppListMainView::ShowAppListWhenReady() {
}
void AppListMainView::ResetForShow() {
- if (switches::IsExperimentalAppListEnabled()) {
- contents_view_->SetActivePage(
- contents_view_->GetPageIndexForState(AppListModel::STATE_START));
- }
+ if (switches::IsExperimentalAppListEnabled())
+ contents_view_->SetActiveState(AppListModel::STATE_START);
+
contents_view_->apps_container_view()->ResetForShowApps();
// We clear the search when hiding so when app list appears it is not showing
// search results.
@@ -262,8 +261,7 @@ void AppListMainView::UpdateCustomLauncherPageVisibility() {
AppListModel::STATE_CUSTOM_LAUNCHER_PAGE)) {
// Animate to the start page if currently on the custom page view. The view
// will hide on animation completion.
- contents_view_->SetActivePage(
- contents_view_->GetPageIndexForState(AppListModel::STATE_START));
+ contents_view_->SetActiveState(AppListModel::STATE_START);
} else {
// Hide the view immediately otherwise.
custom_page->SetVisible(false);
« no previous file with comments | « ui/app_list/views/all_apps_tile_item_view.cc ('k') | ui/app_list/views/app_list_main_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698