| 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 c9ea27655c55962d62d45ed9a73f2db58491bcb9..a44cd1439f4dcaf7ab2602aa7edc40f16e13ffb9 100644
|
| --- a/ui/app_list/views/contents_view.cc
|
| +++ b/ui/app_list/views/contents_view.cc
|
| @@ -56,7 +56,14 @@ void ContentsView::Init(AppListModel* model,
|
| custom_page_views.begin();
|
| it != custom_page_views.end();
|
| ++it) {
|
| - AddLauncherPage(*it, IDR_APP_LIST_NOTIFICATIONS_ICON);
|
| + // Only the first launcher page should be the custom launcher page state.
|
| + if (it == custom_page_views.begin()) {
|
| + AddLauncherPage(*it,
|
| + IDR_APP_LIST_NOTIFICATIONS_ICON,
|
| + AppListModel::STATE_CUSTOM_LAUNCHER_PAGE);
|
| + } else {
|
| + AddLauncherPage(*it, IDR_APP_LIST_NOTIFICATIONS_ICON);
|
| + }
|
| }
|
|
|
| start_page_view_ = new StartPageView(app_list_main_view_, view_delegate);
|
| @@ -137,6 +144,15 @@ int ContentsView::GetPageIndexForState(AppListModel::State state) const {
|
| return it->second;
|
| }
|
|
|
| +AppListModel::State ContentsView::GetStateForPageIndex(int index) const {
|
| + std::map<int, AppListModel::State>::const_iterator it =
|
| + view_to_state_.find(index);
|
| + if (it == view_to_state_.end())
|
| + return AppListModel::INVALID_STATE;
|
| +
|
| + return it->second;
|
| +}
|
| +
|
| int ContentsView::NumLauncherPages() const {
|
| return pagination_model_.total_pages();
|
| }
|
|
|