#include "ui/events/gesture_detection/touch_disposition_gesture_filter.h"
#include <stddef.h>
#include "base/auto_reset.h"
#include "base/check_op.h"
#include "base/notreached.h"
#include "base/trace_event/typed_macros.h"
#include "base/types/cxx23_to_underlying.h"
#include "ui/base/ui_base_features.h"
#include "ui/events/gesture_event_details.h"
namespace ui {
namespace {
static_assert …;
GestureEventData CreateGesture(EventType type,
int motion_event_id,
MotionEvent::ToolType primary_tool_type,
const GestureEventDataPacket& packet) { … }
enum RequiredTouches { … };
struct DispositionHandlingInfo { … };
DispositionHandlingInfo Info(int required_touches) { … }
DispositionHandlingInfo Info(int required_touches,
EventType antecedent_event_type) { … }
DispositionHandlingInfo GetDispositionHandlingInfo(EventType type) { … }
int GetGestureTypeIndex(EventType type) { … }
bool IsTouchStartEvent(GestureEventDataPacket::GestureSource gesture_source) { … }
bool DoAddInputTimestampsToGesture(const GestureEventData& gesture_data) { … }
}
TouchDispositionGestureFilter::TouchDispositionGestureFilter(
TouchDispositionGestureFilterClient* client)
: … { … }
TouchDispositionGestureFilter::~TouchDispositionGestureFilter() { … }
TouchDispositionGestureFilter::PacketResult
TouchDispositionGestureFilter::OnGesturePacket(
const GestureEventDataPacket& packet) { … }
void TouchDispositionGestureFilter::OnTouchEventAck(
uint32_t unique_touch_event_id,
bool event_consumed,
bool is_source_touch_event_set_blocking,
const std::optional<EventLatencyMetadata>& event_latency_metadata) { … }
void TouchDispositionGestureFilter::SendAckedEvents(
const std::optional<EventLatencyMetadata>& event_latency_metadata) { … }
bool TouchDispositionGestureFilter::IsEmpty() const { … }
void TouchDispositionGestureFilter::ResetGestureHandlingState() { … }
void TouchDispositionGestureFilter::FilterAndSendPacket(
const GestureEventDataPacket& packet) { … }
void TouchDispositionGestureFilter::SendGesture(
const GestureEventData& event,
const GestureEventDataPacket& packet_being_sent) { … }
void TouchDispositionGestureFilter::CancelTapIfNecessary(
const GestureEventDataPacket& packet_being_sent) { … }
void TouchDispositionGestureFilter::CancelFlingIfNecessary(
const GestureEventDataPacket& packet_being_sent) { … }
void TouchDispositionGestureFilter::EndScrollIfNecessary(
const GestureEventDataPacket& packet_being_sent) { … }
void TouchDispositionGestureFilter::PopGestureSequence() { … }
TouchDispositionGestureFilter::GestureSequence&
TouchDispositionGestureFilter::Head() { … }
TouchDispositionGestureFilter::GestureSequence&
TouchDispositionGestureFilter::Tail() { … }
TouchDispositionGestureFilter::GestureHandlingState::GestureHandlingState()
: … { … }
void TouchDispositionGestureFilter::GestureHandlingState::OnTouchEventAck(
bool event_consumed,
bool is_touch_start_event) { … }
bool TouchDispositionGestureFilter::GestureHandlingState::Filter(
EventType gesture_type) { … }
bool TouchDispositionGestureFilter::GestureHandlingState::
HasFilteredGestureType(EventType gesture_type) const { … }
}