#include "components/input/touch_timeout_handler.h"
#include <utility>
#include "base/auto_reset.h"
#include "base/functional/bind.h"
#include "base/metrics/histogram_macros.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "components/input/passthrough_touch_event_queue.h"
#include "ui/events/base_event_utils.h"
#include "ui/gfx/geometry/point_f.h"
WebInputEvent;
WebTouchEvent;
WebTouchPoint;
LatencyInfo;
namespace input {
namespace {
bool ShouldTouchTriggerTimeout(const WebTouchEvent& event) { … }
}
TouchTimeoutHandler::TouchTimeoutHandler(
PassthroughTouchEventQueue* touch_queue,
base::TimeDelta desktop_timeout_delay,
base::TimeDelta mobile_timeout_delay,
scoped_refptr<base::SequencedTaskRunner> task_runner)
: … { … }
TouchTimeoutHandler::~TouchTimeoutHandler() { … }
void TouchTimeoutHandler::StartIfNecessary(
const TouchEventWithLatencyInfo& event) { … }
bool TouchTimeoutHandler::ConfirmTouchEvent(
uint32_t unique_touch_event_id,
blink::mojom::InputEventResultState ack_result,
bool should_stop_timeout_monitor) { … }
bool TouchTimeoutHandler::FilterEvent(const WebTouchEvent& event) { … }
void TouchTimeoutHandler::StopTimeoutMonitor() { … }
void TouchTimeoutHandler::SetEnabled(bool enabled) { … }
void TouchTimeoutHandler::SetUseMobileTimeout(bool use_mobile_timeout) { … }
void TouchTimeoutHandler::OnTimeOut() { … }
bool TouchTimeoutHandler::AckedTimeoutEventRequiresCancel(
blink::mojom::InputEventResultState ack_result) const { … }
void TouchTimeoutHandler::SetPendingAckState(
PendingAckState new_pending_ack_state) { … }
void TouchTimeoutHandler::LogSequenceStartForUMA() { … }
void TouchTimeoutHandler::LogSequenceEndForUMAIfNecessary(bool timed_out) { … }
base::TimeDelta TouchTimeoutHandler::GetTimeoutDelay() const { … }
bool TouchTimeoutHandler::HasTimeoutEvent() const { … }
}