#include "remoting/client/gesture_interpreter.h"
#include <memory>
#include "base/functional/bind.h"
#include "base/time/time.h"
#include "remoting/client/chromoting_session.h"
#include "remoting/client/display/renderer_proxy.h"
#include "remoting/client/input/direct_touch_input_strategy.h"
#include "remoting/client/input/trackpad_input_strategy.h"
namespace {
const float kOneFingerFlingTimeConstant = …;
const float kScrollFlingTimeConstant = …;
}
namespace remoting {
GestureInterpreter::GestureInterpreter()
: … { … }
GestureInterpreter::~GestureInterpreter() = default;
void GestureInterpreter::SetContext(RendererProxy* renderer,
ChromotingSession* input_stub) { … }
void GestureInterpreter::SetInputMode(InputMode mode) { … }
GestureInterpreter::InputMode GestureInterpreter::GetInputMode() const { … }
void GestureInterpreter::Zoom(float pivot_x,
float pivot_y,
float scale,
GestureState state) { … }
void GestureInterpreter::Pan(float translation_x, float translation_y) { … }
void GestureInterpreter::Tap(float x, float y) { … }
void GestureInterpreter::TwoFingerTap(float x, float y) { … }
void GestureInterpreter::ThreeFingerTap(float x, float y) { … }
void GestureInterpreter::Drag(float x, float y, GestureState state) { … }
void GestureInterpreter::OneFingerFling(float velocity_x, float velocity_y) { … }
void GestureInterpreter::Scroll(float x, float y, float dx, float dy) { … }
void GestureInterpreter::ScrollWithVelocity(float velocity_x,
float velocity_y) { … }
void GestureInterpreter::ProcessAnimations() { … }
void GestureInterpreter::OnSurfaceSizeChanged(int width, int height) { … }
void GestureInterpreter::OnDesktopSizeChanged(int width, int height) { … }
void GestureInterpreter::OnSafeInsetsChanged(int left,
int top,
int right,
int bottom) { … }
base::WeakPtr<GestureInterpreter> GestureInterpreter::GetWeakPtr() { … }
void GestureInterpreter::PanWithoutAbortAnimations(float translation_x,
float translation_y) { … }
void GestureInterpreter::InjectCursorPosition(float x, float y) { … }
void GestureInterpreter::ScrollWithoutAbortAnimations(float dx, float dy) { … }
void GestureInterpreter::AbortAnimations() { … }
void GestureInterpreter::InjectMouseClick(
float touch_x,
float touch_y,
protocol::MouseEvent_MouseButton button) { … }
void GestureInterpreter::SetGestureInProgress(
TouchInputStrategy::Gesture gesture,
bool is_in_progress) { … }
void GestureInterpreter::StartInputFeedback(
float cursor_x,
float cursor_y,
TouchInputStrategy::TouchFeedbackType feedback_type) { … }
}