#include "content/common/input/synthetic_smooth_move_gesture.h"
#include <stdint.h>
#include "base/check_op.h"
#include "base/notreached.h"
#include "base/time/time.h"
#include "third_party/blink/public/common/input/synthetic_web_input_event_builders.h"
#include "ui/gfx/geometry/point_f.h"
namespace content {
namespace {
gfx::Vector2dF ProjectScalarOntoVector(float scalar,
const gfx::Vector2dF& vector) { … }
float GetCurvedRatio(const base::TimeTicks& current,
const base::TimeTicks& start,
const base::TimeTicks& end,
int speed_in_pixels_s) { … }
}
SyntheticSmoothMoveGestureParams::SyntheticSmoothMoveGestureParams() = default;
SyntheticSmoothMoveGestureParams::SyntheticSmoothMoveGestureParams(
const SyntheticSmoothMoveGestureParams& other) = default;
SyntheticSmoothMoveGestureParams::~SyntheticSmoothMoveGestureParams() = default;
SyntheticGestureParams::GestureType
SyntheticSmoothMoveGestureParams::GetGestureType() const { … }
SyntheticSmoothMoveGesture::SyntheticSmoothMoveGesture(
const SyntheticSmoothMoveGestureParams& gesture_params)
: … { … }
SyntheticSmoothMoveGesture::~SyntheticSmoothMoveGesture() { … }
SyntheticGesture::Result SyntheticSmoothMoveGesture::ForwardInputEvents(
const base::TimeTicks& timestamp,
SyntheticGestureTarget* target) { … }
void SyntheticSmoothMoveGesture::ForwardTouchInputEvents(
const base::TimeTicks& timestamp,
SyntheticGestureTarget* target) { … }
void SyntheticSmoothMoveGesture::ForwardMouseWheelInputEvents(
const base::TimeTicks& timestamp,
SyntheticGestureTarget* target) { … }
void SyntheticSmoothMoveGesture::ForwardMouseClickInputEvents(
const base::TimeTicks& timestamp,
SyntheticGestureTarget* target) { … }
void SyntheticSmoothMoveGesture::ForwardMouseWheelEvent(
SyntheticGestureTarget* target,
const gfx::Vector2dF& delta,
const blink::WebMouseWheelEvent::Phase phase,
const base::TimeTicks& timestamp,
int modifiers) const { … }
void SyntheticSmoothMoveGesture::ForwardFlingGestureEvent(
SyntheticGestureTarget* target,
const blink::WebInputEvent::Type type) const { … }
void SyntheticSmoothMoveGesture::PressPoint(SyntheticGestureTarget* target,
const base::TimeTicks& timestamp) { … }
void SyntheticSmoothMoveGesture::MovePoint(SyntheticGestureTarget* target,
const gfx::Vector2dF& delta,
const base::TimeTicks& timestamp) { … }
void SyntheticSmoothMoveGesture::ReleasePoint(
SyntheticGestureTarget* target,
const base::TimeTicks& timestamp) { … }
void SyntheticSmoothMoveGesture::AddTouchSlopToFirstDistance(
SyntheticGestureTarget* target) { … }
gfx::Vector2dF SyntheticSmoothMoveGesture::GetPositionDeltaAtTime(
const base::TimeTicks& timestamp) const { … }
void SyntheticSmoothMoveGesture::ComputeNextMoveSegment() { … }
base::TimeTicks SyntheticSmoothMoveGesture::ClampTimestamp(
const base::TimeTicks& timestamp) const { … }
bool SyntheticSmoothMoveGesture::FinishedCurrentMoveSegment(
const base::TimeTicks& timestamp) const { … }
bool SyntheticSmoothMoveGesture::IsLastMoveSegment() const { … }
bool SyntheticSmoothMoveGesture::MoveIsNoOp() const { … }
}