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

Unified Diff: athena/wm/window_overview_mode.cc

Issue 634373003: Consolidate content fling implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win build Created 6 years, 2 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 | « no previous file | content/child/OWNERS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/wm/window_overview_mode.cc
diff --git a/athena/wm/window_overview_mode.cc b/athena/wm/window_overview_mode.cc
index 0b16b6c2b288e519985d5ce0fa45e1adf5260a34..b8b10314eb9cd03653d8b617e09cfbbad4bd9a59 100644
--- a/athena/wm/window_overview_mode.cc
+++ b/athena/wm/window_overview_mode.cc
@@ -777,14 +777,15 @@ class WindowOverviewModeImpl : public WindowOverviewMode,
// ui::CompositorAnimationObserver:
virtual void OnAnimationStep(base::TimeTicks timestamp) override {
CHECK(fling_);
- if (fling_->start_timestamp() > timestamp)
- return;
- gfx::Vector2dF scroll = fling_->GetScrollAmountAtTime(timestamp);
- if (scroll.IsZero()) {
+ gfx::Vector2dF delta;
+ bool fling_active = fling_->ComputeScrollDeltaAtTime(timestamp, &delta);
+
+ if (!delta.IsZero())
+ DoScroll(delta.y());
+
+ if (!fling_active) {
fling_.reset();
RemoveAnimationObserver();
- } else {
- DoScroll(scroll.y());
}
}
« no previous file with comments | « no previous file | content/child/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698