| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCHSCREEN_TAP_SUPPRESSION_CONTROLL
ER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCHSCREEN_TAP_SUPPRESSION_CONTROLL
ER_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCHSCREEN_TAP_SUPPRESSION_CONTROLL
ER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCHSCREEN_TAP_SUPPRESSION_CONTROLL
ER_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "content/browser/renderer_host/event_with_latency_info.h" | 9 #include "content/browser/renderer_host/event_with_latency_info.h" |
| 10 #include "content/browser/renderer_host/input/tap_suppression_controller.h" | 10 #include "content/browser/renderer_host/input/tap_suppression_controller.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 void GestureFlingCancel(); | 28 void GestureFlingCancel(); |
| 29 | 29 |
| 30 // Should be called on arrival of ACK for a GestureFlingCancel event. | 30 // Should be called on arrival of ACK for a GestureFlingCancel event. |
| 31 // |processed| is true if the GestureFlingCancel successfully stopped a fling. | 31 // |processed| is true if the GestureFlingCancel successfully stopped a fling. |
| 32 void GestureFlingCancelAck(bool processed); | 32 void GestureFlingCancelAck(bool processed); |
| 33 | 33 |
| 34 // Should be called on arrival of any tap-related events. Returns true if the | 34 // Should be called on arrival of any tap-related events. Returns true if the |
| 35 // caller should stop normal handling of the gesture. | 35 // caller should stop normal handling of the gesture. |
| 36 bool FilterTapEvent(const GestureEventWithLatencyInfo& event); | 36 bool FilterTapEvent(const GestureEventWithLatencyInfo& event); |
| 37 | 37 |
| 38 // Reset the state of tap suppression. |
| 39 void Reset(); |
| 40 |
| 38 private: | 41 private: |
| 39 // TapSuppressionControllerClient implementation. | 42 // TapSuppressionControllerClient implementation. |
| 40 virtual void DropStashedTapDown() override; | 43 virtual void DropStashedTapDown() override; |
| 41 virtual void ForwardStashedTapDown() override; | 44 virtual void ForwardStashedTapDown() override; |
| 42 | 45 |
| 43 GestureEventQueue* gesture_event_queue_; | 46 GestureEventQueue* gesture_event_queue_; |
| 44 | 47 |
| 45 typedef scoped_ptr<GestureEventWithLatencyInfo> ScopedGestureEvent; | 48 typedef scoped_ptr<GestureEventWithLatencyInfo> ScopedGestureEvent; |
| 46 ScopedGestureEvent stashed_tap_down_; | 49 ScopedGestureEvent stashed_tap_down_; |
| 47 ScopedGestureEvent stashed_show_press_; | 50 ScopedGestureEvent stashed_show_press_; |
| 48 | 51 |
| 49 // The core controller of tap suppression. | 52 // The core controller of tap suppression. |
| 50 TapSuppressionController controller_; | 53 TapSuppressionController controller_; |
| 51 | 54 |
| 52 DISALLOW_COPY_AND_ASSIGN(TouchscreenTapSuppressionController); | 55 DISALLOW_COPY_AND_ASSIGN(TouchscreenTapSuppressionController); |
| 53 }; | 56 }; |
| 54 | 57 |
| 55 } // namespace content | 58 } // namespace content |
| 56 | 59 |
| 57 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCHSCREEN_TAP_SUPPRESSION_CONTR
OLLER_H_ | 60 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCHSCREEN_TAP_SUPPRESSION_CONTR
OLLER_H_ |
| OLD | NEW |