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

Unified Diff: remoting/client/ui/gesture_interpreter.cc

Issue 2888423003: [CRD iOS] Fix bugs in FlingTracker (Closed)
Patch Set: WIP Created 3 years, 7 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
« remoting/client/ui/fling_tracker.cc ('K') | « remoting/client/ui/fling_tracker.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/ui/gesture_interpreter.cc
diff --git a/remoting/client/ui/gesture_interpreter.cc b/remoting/client/ui/gesture_interpreter.cc
index 8d0263729f9ffe065b5a2ff3508fff69bb76a458..8f7b803d952292fa66d4e525c70fd1acc302b6f9 100644
--- a/remoting/client/ui/gesture_interpreter.cc
+++ b/remoting/client/ui/gesture_interpreter.cc
@@ -14,7 +14,7 @@
namespace {
const float kOneFingerFlingTimeConstant = 325.f;
-const float kScrollFlingTimeConstant = 120.f;
+const float kScrollFlingTimeConstant = 250.f;
} // namespace
@@ -136,6 +136,9 @@ void GestureInterpreter::ScrollWithVelocity(float velocity_x,
void GestureInterpreter::ProcessAnimations() {
pan_animation_.Tick();
+
+ // TODO(yuweih): It's probably not right to handle host side animation in
+ // renderer's callback.
scroll_animation_.Tick();
nicholss 2017/05/22 20:17:00 It is not really animation, more like virtual scro
Yuwei 2017/05/22 21:18:25 Done.
}
@@ -174,6 +177,7 @@ void GestureInterpreter::ScrollWithoutAbortAnimations(float dx, float dy) {
void GestureInterpreter::AbortAnimations() {
pan_animation_.Abort();
+ scroll_animation_.Abort();
}
void GestureInterpreter::InjectMouseClick(
« remoting/client/ui/fling_tracker.cc ('K') | « remoting/client/ui/fling_tracker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698