Chromium Code Reviews| Index: ui/app_list/presenter/app_list_presenter_impl.cc |
| diff --git a/ui/app_list/presenter/app_list_presenter_impl.cc b/ui/app_list/presenter/app_list_presenter_impl.cc |
| index c4ef309215f59c14134c09e053aa685c4a643e51..ea98f69ae9e8106e8d5149b47db788f32946d0f6 100644 |
| --- a/ui/app_list/presenter/app_list_presenter_impl.cc |
| +++ b/ui/app_list/presenter/app_list_presenter_impl.cc |
| @@ -6,6 +6,7 @@ |
| #include "base/metrics/user_metrics.h" |
| #include "ui/app_list/app_list_constants.h" |
| +#include "ui/app_list/app_list_features.h" |
| #include "ui/app_list/app_list_switches.h" |
| #include "ui/app_list/pagination_model.h" |
| #include "ui/app_list/presenter/app_list_presenter_delegate_factory.h" |
| @@ -34,7 +35,8 @@ inline ui::Layer* GetLayer(views::Widget* widget) { |
| AppListPresenterImpl::AppListPresenterImpl( |
| std::unique_ptr<AppListPresenterDelegateFactory> factory) |
| - : factory_(std::move(factory)) { |
| + : factory_(std::move(factory)), |
| + is_fullscreen_app_list_enabled_(features::IsFullscreenAppListEnabled()) { |
| DCHECK(factory_); |
| } |
| @@ -272,7 +274,11 @@ void AppListPresenterImpl::TransitionChanged() { |
| const PaginationModel::Transition& transition = |
| pagination_model->transition(); |
| - if (pagination_model->is_valid_page(transition.target_page)) |
| + |
| + // Disable overscroll animation when the fullscreen app list feature is |
| + // enabled or when the transition is to a valid page. |
| + if (is_fullscreen_app_list_enabled_ || |
|
xiyuan
2017/06/23 20:02:44
nit: Move this to around line 272 and on its own "
newcomer
2017/06/26 16:13:58
Done!
|
| + pagination_model->is_valid_page(transition.target_page)) |
| return; |
| views::Widget* widget = view_->GetWidget(); |