chromium/components/input/fling_controller.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 =;

// Maximum time between a fling event's timestamp and the first |Progress| call
// for the fling curve to use the fling timestamp as the initial animation time.
// Two frames allows a minor delay between event creation and the first
// progress.
constexpr base::TimeDelta kMaxMicrosecondsFromFlingTimestampToFirstProgress =;

// Since the progress fling is called in ProcessGestureFlingStart right after
// processing the GFS, it is possible to have a very small delta for the first
// event. Don't send an event with deltas smaller than the
// |kMinInertialScrollDelta| since the renderer ignores it and the fling gets
// cancelled in RenderWidgetHostViewAndroid::GestureEventAck due to an inertial
// GSU with ack ignored.
const float kMinInertialScrollDelta =;

const char* kFlingTraceName =;

}  // namespace

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 /* = gfx::Vector2dF() */) {}

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) {}

}  // namespace input