Chromium Code Reviews| 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 df9f32b49734ed99b4df132e90fb4f3d58072eb3..02690dcd951aca64b8f3c29c007520cca3f82d57 100644 |
| --- a/ui/app_list/views/app_list_main_view.cc |
| +++ b/ui/app_list/views/app_list_main_view.cc |
| @@ -251,27 +251,11 @@ bool AppListMainView::ShouldShowCustomLauncherPage() const { |
| } |
| void AppListMainView::UpdateCustomLauncherPageVisibility() { |
| - if (ShouldShowCustomLauncherPage()) { |
| - // Make the custom page view visible again. |
| - contents_view_->custom_page_view()->SetVisible(true); |
| - } else if (contents_view_->IsStateActive( |
| - 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)); |
| - } else { |
| - // Hide the view immediately otherwise. |
| - contents_view_->custom_page_view()->SetVisible(false); |
| - } |
| -} |
| - |
| -void AppListMainView::OnCustomLauncherPageEnabledStateChanged(bool enabled) { |
| views::View* custom_page = contents_view_->custom_page_view(); |
| if (!custom_page) |
| return; |
| - if (enabled) { |
| + if (ShouldShowCustomLauncherPage()) { |
|
Matt Giuca
2015/02/27 06:11:33
Could you get this to work by JUST doing this chan
calamity
2015/03/02 02:39:26
Done.
|
| // Make the custom page view visible again. |
| custom_page->SetVisible(true); |
| } else if (contents_view_->IsStateActive( |
| @@ -286,9 +270,13 @@ void AppListMainView::OnCustomLauncherPageEnabledStateChanged(bool enabled) { |
| } |
| } |
| +void AppListMainView::OnCustomLauncherPageEnabledStateChanged(bool enabled) { |
| + UpdateCustomLauncherPageVisibility(); |
| +} |
| + |
| void AppListMainView::OnSearchEngineIsGoogleChanged(bool is_google) { |
| if (contents_view_->custom_page_view()) |
| - OnCustomLauncherPageEnabledStateChanged(is_google); |
| + UpdateCustomLauncherPageVisibility(); |
| if (contents_view_->start_page_view()) { |
| contents_view_->start_page_view()->instant_container()->SetVisible( |