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

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

Issue 2882653004: [CRD iOS] Injecting scroll events w/ fling animation (Closed)
Patch Set: Rebase 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
« no previous file with comments | « remoting/client/ui/fling_animation.cc ('k') | remoting/client/ui/gesture_interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/ui/gesture_interpreter.h
diff --git a/remoting/client/ui/gesture_interpreter.h b/remoting/client/ui/gesture_interpreter.h
index 5418e624c45cd3ac93c610aca3eb76009825d010..818f8ca99a031c623b7aad4b3cdfb9d5ceb8b811 100644
--- a/remoting/client/ui/gesture_interpreter.h
+++ b/remoting/client/ui/gesture_interpreter.h
@@ -49,6 +49,13 @@ class GestureInterpreter {
// pinching) and the pan gesture still has some final velocity.
void OneFingerFling(float velocity_x, float velocity_y);
+ // Called during a two-finger scroll (panning without pinching) gesture.
+ void Scroll(float x, float y, float dx, float dy);
+
+ // Called when the user has just done a scroll gesture and the scroll gesture
+ // still has some final velocity.
+ void ScrollWithVelocity(float velocity_x, float velocity_y);
+
// Called to process one animation frame.
void ProcessAnimations();
@@ -58,6 +65,8 @@ class GestureInterpreter {
private:
void PanWithoutAbortAnimations(float translation_x, float translation_y);
+ void ScrollWithoutAbortAnimations(float dx, float dy);
+
void AbortAnimations();
void InjectMouseClick(float x,
@@ -85,6 +94,7 @@ class GestureInterpreter {
bool is_dragging_mode_ = false;
FlingAnimation pan_animation_;
+ FlingAnimation scroll_animation_;
// GestureInterpreter is neither copyable nor movable.
GestureInterpreter(const GestureInterpreter&) = delete;
« no previous file with comments | « remoting/client/ui/fling_animation.cc ('k') | remoting/client/ui/gesture_interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698