#include "components/input/fling_controller.h"
#include "base/time/default_tick_clock.h"
#include "base/trace_event/trace_event.h"
#include "ui/events/base_event_utils.h"
#include "ui/events/gestures/blink/web_gesture_curve_impl.h"
WebInputEvent;
WebGestureEvent;
namespace {
constexpr base::TimeDelta kFrameDelta = …;
constexpr base::TimeDelta kMaxMicrosecondsFromFlingTimestampToFirstProgress = …;
const float kMinInertialScrollDelta = …;
const char* kFlingTraceName = …;
}
namespace input {
FlingController::Config::Config() { … }
FlingController::FlingController(
FlingControllerEventSenderClient* event_sender_client,
FlingControllerSchedulerClient* scheduler_client,
const Config& config)
: … { … }
FlingController::~FlingController() = default;
bool FlingController::ObserveAndFilterForTapSuppression(
const GestureEventWithLatencyInfo& gesture_event) { … }
bool FlingController::ObserveAndMaybeConsumeGestureEvent(
const GestureEventWithLatencyInfo& gesture_event) { … }
void FlingController::ProcessGestureFlingStart(
const GestureEventWithLatencyInfo& gesture_event) { … }
void FlingController::ScheduleFlingProgress() { … }
void FlingController::ProcessGestureFlingCancel(
const GestureEventWithLatencyInfo& gesture_event) { … }
void FlingController::ProgressFling(base::TimeTicks current_time) { … }
void FlingController::StopFling() { … }
void FlingController::GenerateAndSendWheelEvents(
base::TimeTicks current_time,
const gfx::Vector2dF& delta,
blink::WebMouseWheelEvent::Phase phase) { … }
void FlingController::GenerateAndSendGestureScrollEvents(
base::TimeTicks current_time,
WebInputEvent::Type type,
const gfx::Vector2dF& delta ) { … }
void FlingController::GenerateAndSendFlingProgressEvents(
base::TimeTicks current_time,
const gfx::Vector2dF& delta) { … }
void FlingController::GenerateAndSendFlingEndEvents(
base::TimeTicks current_time) { … }
void FlingController::EndCurrentFling(base::TimeTicks current_time) { … }
bool FlingController::UpdateCurrentFlingState(
const WebGestureEvent& fling_start_event) { … }
gfx::Vector2dF FlingController::CurrentFlingVelocity() const { … }
TouchpadTapSuppressionController*
FlingController::GetTouchpadTapSuppressionController() { … }
void FlingController::OnWheelEventAck(
const MouseWheelEventWithLatencyInfo& event,
blink::mojom::InputEventResultSource ack_source,
blink::mojom::InputEventResultState ack_result) { … }
}