Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Unified Diff: ui/app_list/presenter/app_list_presenter_impl.cc

Issue 2948403002: Disabled overscroll animation when the fullscreen app list feature is enabled. (Closed)
Patch Set: Disabled overscroll animation when the fullscreen app list feature is enabled. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/app_list/presenter/app_list_presenter_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..dd1c55a4be4d01dc94ff53d8579add8c5523f08f 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_);
}
@@ -268,10 +270,16 @@ void AppListPresenterImpl::TransitionChanged() {
if (!view_)
return;
+ // Disable overscroll animation when the fullscreen app list feature is
+ // enabled.
+ if (is_fullscreen_app_list_enabled_)
+ return;
+
PaginationModel* pagination_model = view_->GetAppsPaginationModel();
const PaginationModel::Transition& transition =
pagination_model->transition();
+
if (pagination_model->is_valid_page(transition.target_page))
return;
« no previous file with comments | « ui/app_list/presenter/app_list_presenter_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698