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

Unified Diff: remoting/client/gesture_interpreter.h

Issue 2869723007: [CRD iOS] Viewport fling animation (Closed)
Patch Set: Merge branch 'master' into feat-fling-animation 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
Index: remoting/client/gesture_interpreter.h
diff --git a/remoting/client/gesture_interpreter.h b/remoting/client/gesture_interpreter.h
index 9ad968fff2353ef1e62c8ded65b05eee744deff2..23defba1c022ed597e31041b33ce368367333d47 100644
--- a/remoting/client/gesture_interpreter.h
+++ b/remoting/client/gesture_interpreter.h
@@ -9,6 +9,7 @@
#include "remoting/client/chromoting_session.h"
#include "remoting/client/desktop_viewport.h"
+#include "remoting/client/fling_animation.h"
#include "remoting/proto/event.pb.h"
namespace remoting {
@@ -36,10 +37,19 @@ class GestureInterpreter {
// progress.
void LongPress(float x, float y, GestureState state);
+ void OneFingerFling(float velocity_x, float velocity_y);
+
+ // Called to process one animation frame.
+ void ProcessAnimations();
+
void OnSurfaceSizeChanged(int width, int height);
void OnDesktopSizeChanged(int width, int height);
private:
+ void PanWithoutAbortAnimations(float translation_x, float translation_y);
+
+ void AbortAnimations();
+
void InjectMouseClick(float x,
float y,
protocol::MouseEvent_MouseButton button);
@@ -49,6 +59,8 @@ class GestureInterpreter {
ChromotingSession* input_stub_;
bool is_dragging_mode_ = false;
+ FlingAnimation pan_animation_;
+
// GestureInterpreter is neither copyable nor movable.
GestureInterpreter(const GestureInterpreter&) = delete;
GestureInterpreter& operator=(const GestureInterpreter&) = delete;

Powered by Google App Engine
This is Rietveld 408576698