Commit 74d15398 authored by mgiuca's avatar mgiuca Committed by Commit bot

Experimental app list: Move custom launcher pages to the end.

They now come after the fixed pages (start page and apps grid).

BUG=406222

Review URL: https://codereview.chromium.org/526983002

Cr-Commit-Position: refs/heads/master@{#292900}
parent 875f0319
......@@ -46,15 +46,6 @@ void ContentsView::InitNamedPages(AppListModel* model,
DCHECK(model);
if (app_list::switches::IsExperimentalAppListEnabled()) {
std::vector<views::View*> custom_page_views =
view_delegate->CreateCustomPageWebViews(GetLocalBounds().size());
for (std::vector<views::View*>::const_iterator it =
custom_page_views.begin();
it != custom_page_views.end();
++it) {
AddLauncherPage(*it, IDR_APP_LIST_NOTIFICATIONS_ICON);
}
start_page_view_ = new StartPageView(app_list_main_view_, view_delegate);
AddLauncherPage(
start_page_view_, IDR_APP_LIST_SEARCH_ICON, NAMED_PAGE_START);
......@@ -67,10 +58,23 @@ void ContentsView::InitNamedPages(AppListModel* model,
apps_container_view_ = new AppsContainerView(app_list_main_view_, model);
int initial_page_index = AddLauncherPage(
AddLauncherPage(
apps_container_view_, IDR_APP_LIST_APPS_ICON, NAMED_PAGE_APPS);
if (app_list::switches::IsExperimentalAppListEnabled())
initial_page_index = GetPageIndexForNamedPage(NAMED_PAGE_START);
if (app_list::switches::IsExperimentalAppListEnabled()) {
std::vector<views::View*> custom_page_views =
view_delegate->CreateCustomPageWebViews(GetLocalBounds().size());
for (std::vector<views::View*>::const_iterator it =
custom_page_views.begin();
it != custom_page_views.end();
++it) {
AddLauncherPage(*it, IDR_APP_LIST_NOTIFICATIONS_ICON);
}
}
int initial_page_index = app_list::switches::IsExperimentalAppListEnabled()
? GetPageIndexForNamedPage(NAMED_PAGE_START)
: GetPageIndexForNamedPage(NAMED_PAGE_APPS);
page_before_search_ = initial_page_index;
pagination_model_.SelectPage(initial_page_index, false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment