| 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 11bbd3f04ebd389087ce4e381d94ea1b1baff881..024466e77a85c33d6a0629ce9aef91047af9897b 100644
|
| --- a/ui/app_list/views/contents_view.cc
|
| +++ b/ui/app_list/views/contents_view.cc
|
| @@ -131,15 +131,15 @@ void ContentsView::SetDragAndDropHostOfCurrentAppList(
|
| apps_container_view_->SetDragAndDropHostOfCurrentAppList(drag_and_drop_host);
|
| }
|
|
|
| -void ContentsView::SetActivePage(int page_index) {
|
| - SetActivePage(page_index, true);
|
| +void ContentsView::SetActivePage(AppListModel::State state) {
|
| + SetActivePage(state, true);
|
| }
|
|
|
| -void ContentsView::SetActivePage(int page_index, bool animate) {
|
| - if (GetActivePageIndex() == page_index)
|
| +void ContentsView::SetActivePage(AppListModel::State state, bool animate) {
|
| + if (IsStateActive(state))
|
| return;
|
|
|
| - SetActivePageInternal(page_index, false, animate);
|
| + SetActivePageInternal(GetPageIndexForState(state), false, animate);
|
| }
|
|
|
| int ContentsView::GetActivePageIndex() const {
|
| @@ -432,13 +432,13 @@ bool ContentsView::Back() {
|
| if (app_list_main_view_->model()->PopCustomLauncherPageSubpage())
|
| app_list_main_view_->view_delegate()->CustomLauncherPagePopSubpage();
|
| else
|
| - SetActivePage(GetPageIndexForState(AppListModel::STATE_START));
|
| + SetActivePage(AppListModel::STATE_START);
|
| break;
|
| case AppListModel::STATE_APPS:
|
| if (apps_container_view_->IsInFolderView())
|
| apps_container_view_->app_list_folder_view()->CloseFolderPage();
|
| else
|
| - SetActivePage(GetPageIndexForState(AppListModel::STATE_START));
|
| + SetActivePage(AppListModel::STATE_START);
|
| break;
|
| case AppListModel::STATE_SEARCH_RESULTS:
|
| GetSearchBoxView()->ClearSearch();
|
|
|