// 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. #ifndef COMPONENTS_INPUT_PASSTHROUGH_TOUCH_EVENT_QUEUE_H_ #define COMPONENTS_INPUT_PASSTHROUGH_TOUCH_EVENT_QUEUE_H_ #include <set> #include <string> #include "base/feature_list.h" #include "base/gtest_prod_util.h" #include "base/memory/raw_ptr.h" #include "base/metrics/field_trial_params.h" #include "base/time/time.h" #include "components/input/event_with_latency_info.h" #include "base/component_export.h" #include "third_party/blink/public/common/features.h" #include "third_party/blink/public/mojom/input/input_event_result.mojom-shared.h" #include "ui/events/blink/blink_features.h" namespace content { class InputRouterImplTestBase; } // namespace content namespace input { class TouchTimeoutHandler; // Interface with which PassthroughTouchEventQueue can forward touch events, and // dispatch touch event responses. class COMPONENT_EXPORT(INPUT) PassthroughTouchEventQueueClient { … }; // A queue that processes a touch-event and forwards it on to the // renderer process immediately. This class assumes that queueing will // happen inside the renderer process. This class will hold onto the pending // events so that it can re-order the acks so that they appear in a // logical order to the rest of the browser process. Due to the threaded // model of the renderer it is possible that an ack for a touchend can // be sent before the corresponding ack for the touchstart. This class // corrects that state. // // This class also performs filtering over the sequence of touch-events to, for // example, avoid sending events to the renderer that would have no effect. By // default, we always forward touchstart and touchend but, if there are no // handlers, touchmoves are filtered out of the sequence. The filtering logic // is implemented in |FilterBeforeForwarding|. class COMPONENT_EXPORT(INPUT) PassthroughTouchEventQueue { … }; } // namespace input #endif // COMPONENTS_INPUT_PASSTHROUGH_TOUCH_EVENT_QUEUE_H_