Index: content/browser/renderer_host/input/gesture_event_filter.h |
diff --git a/content/browser/renderer_host/input/gesture_event_filter.h b/content/browser/renderer_host/input/gesture_event_filter.h |
deleted file mode 100644 |
index da1850d944e33e382ecb5c3e6ca52fd28a090899..0000000000000000000000000000000000000000 |
--- a/content/browser/renderer_host/input/gesture_event_filter.h |
+++ /dev/null |
@@ -1,106 +0,0 @@ |
-// Copyright 2013 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-#ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_FILTER_H_ |
-#define CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_FILTER_H_ |
- |
-#include <deque> |
- |
-#include "base/basictypes.h" |
-#include "base/memory/scoped_ptr.h" |
-#include "base/timer/timer.h" |
-#include "content/browser/renderer_host/input/base_gesture_event_filter.h" |
-#include "content/browser/renderer_host/input/gesture_event_filter_client.h" |
-#include "content/common/content_export.h" |
-#include "content/port/browser/event_with_latency_info.h" |
-#include "content/port/common/input_event_ack_state.h" |
-#include "third_party/WebKit/public/web/WebInputEvent.h" |
-#include "ui/gfx/transform.h" |
- |
-namespace content { |
-class GestureEventFilterTest; |
-class InputRouter; |
-class MockRenderWidgetHost; |
-class TouchpadTapSuppressionController; |
-class TouchpadTapSuppressionControllerClient; |
-class TouchscreenTapSuppressionController; |
- |
-// Adds the following filters on top of BaseGestureEventFilter's filtering |
-// 1. Zero-velocity fling-starts from touchpad are filtered. |
-// 2. Unnecessary GestureFlingCancel events are filtered. These are |
-// GestureFlingCancels that have no corresponding GestureFlingStart in the |
-// queue. |
-// 3. Taps immediately after a GestureFlingCancel (caused by the same tap) are |
-// filtered. |
-class CONTENT_EXPORT GestureEventFilter : public BaseGestureEventFilter { |
- public: |
- // Both |client| and |touchpad_client| must outlive the GestureEventFilter. |
- GestureEventFilter(GestureEventFilterClient* client, |
- TouchpadTapSuppressionControllerClient* touchpad_client); |
- ~GestureEventFilter(); |
- |
- // Overridden from BaseGestureEventFilter. |
- virtual bool ShouldForward(const GestureEventWithLatencyInfo&) OVERRIDE; |
- virtual void ProcessGestureAck(InputEventAckState ack_result, |
- WebKit::WebInputEvent::Type type, |
- const ui::LatencyInfo& latency) OVERRIDE; |
- |
- // Sets the state of the |fling_in_progress_| field to indicate that a fling |
- // is definitely not in progress. |
- void FlingHasBeenHalted(); |
- |
- // Returns the |TouchpadTapSuppressionController| instance. |
- TouchpadTapSuppressionController* GetTouchpadTapSuppressionController(); |
- |
- private: |
- friend class MockRenderWidgetHost; |
- friend class GestureEventFilterTest; |
- |
- // Overridden from BaseGestureEventFilter. |
- virtual bool ShouldForwardScrollEndingEvent( |
- const GestureEventWithLatencyInfo& event) OVERRIDE; |
- virtual bool ShouldForwardForCoalescing( |
- const GestureEventWithLatencyInfo& gesture_event) OVERRIDE; |
- |
- // Returns |true| if the given GestureFlingCancel should be discarded |
- // as unnecessary. |
- bool ShouldDiscardFlingCancelEvent( |
- const GestureEventWithLatencyInfo& gesture_event) const; |
- |
- // Sub-filter for removing zero-velocity fling-starts from touchpad. |
- bool ShouldForwardForZeroVelocityFlingStart( |
- const GestureEventWithLatencyInfo& gesture_event) const; |
- |
- // Sub-filter for removing unnecessary GestureFlingCancels. |
- bool ShouldForwardForGFCFiltering( |
- const GestureEventWithLatencyInfo& gesture_event) const; |
- |
- // Sub-filter for suppressing taps immediately after a GestureFlingCancel. |
- bool ShouldForwardForTapSuppression( |
- const GestureEventWithLatencyInfo& gesture_event); |
- |
- // True if a GestureFlingStart is in progress on the renderer or |
- // queued without a subsequent queued GestureFlingCancel event. |
- bool fling_in_progress_; |
- |
- // An object tracking the state of touchpad on the delivery of mouse events to |
- // the renderer to filter mouse immediately after a touchpad fling canceling |
- // tap. |
- // TODO(mohsen): Move touchpad tap suppression out of GestureEventFilter since |
- // GEF is meant to only be used for touchscreen gesture events. |
- scoped_ptr<TouchpadTapSuppressionController> |
- touchpad_tap_suppression_controller_; |
- |
- // An object tracking the state of touchscreen on the delivery of gesture tap |
- // events to the renderer to filter taps immediately after a touchscreen fling |
- // canceling tap. |
- scoped_ptr<TouchscreenTapSuppressionController> |
- touchscreen_tap_suppression_controller_; |
- |
- DISALLOW_COPY_AND_ASSIGN(GestureEventFilter); |
-}; |
- |
-} // namespace content |
- |
-#endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_FILTER_H_ |