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_TOUCHPAD_TAP_SUPPRESSION_CONTROLLER_
H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCHPAD_TAP_SUPPRESSION_CONTROLLER_
H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCHPAD_TAP_SUPPRESSION_CONTROLLER_
H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCHPAD_TAP_SUPPRESSION_CONTROLLER_
H_ |
7 | 7 |
8 #include "content/browser/renderer_host/event_with_latency_info.h" | 8 #include "content/browser/renderer_host/event_with_latency_info.h" |
9 #include "content/browser/renderer_host/input/tap_suppression_controller.h" | 9 #include "content/browser/renderer_host/input/tap_suppression_controller.h" |
10 #include "content/browser/renderer_host/input/tap_suppression_controller_client.
h" | 10 #include "content/browser/renderer_host/input/tap_suppression_controller_client.
h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 // Should be called on arrival of MouseDown events. Returns true if the caller | 42 // Should be called on arrival of MouseDown events. Returns true if the caller |
43 // should stop normal handling of the MouseDown. In this case, the caller is | 43 // should stop normal handling of the MouseDown. In this case, the caller is |
44 // responsible for saving the event for later use, if needed. | 44 // responsible for saving the event for later use, if needed. |
45 bool ShouldDeferMouseDown(const MouseEventWithLatencyInfo& event); | 45 bool ShouldDeferMouseDown(const MouseEventWithLatencyInfo& event); |
46 | 46 |
47 // Should be called on arrival of MouseUp events. Returns true if the caller | 47 // Should be called on arrival of MouseUp events. Returns true if the caller |
48 // should stop normal handling of the MouseUp. | 48 // should stop normal handling of the MouseUp. |
49 bool ShouldSuppressMouseUp(); | 49 bool ShouldSuppressMouseUp(); |
50 | 50 |
| 51 // Reset the state of tap suppression. |
| 52 void Reset(); |
| 53 |
51 private: | 54 private: |
52 friend class MockRenderWidgetHost; | 55 friend class MockRenderWidgetHost; |
53 | 56 |
54 // TapSuppressionControllerClient implementation. | 57 // TapSuppressionControllerClient implementation. |
55 virtual void DropStashedTapDown() override; | 58 virtual void DropStashedTapDown() override; |
56 virtual void ForwardStashedTapDown() override; | 59 virtual void ForwardStashedTapDown() override; |
57 | 60 |
58 TouchpadTapSuppressionControllerClient* client_; | 61 TouchpadTapSuppressionControllerClient* client_; |
59 MouseEventWithLatencyInfo stashed_mouse_down_; | 62 MouseEventWithLatencyInfo stashed_mouse_down_; |
60 | 63 |
61 // The core controller of tap suppression. | 64 // The core controller of tap suppression. |
62 TapSuppressionController controller_; | 65 TapSuppressionController controller_; |
63 | 66 |
64 DISALLOW_COPY_AND_ASSIGN(TouchpadTapSuppressionController); | 67 DISALLOW_COPY_AND_ASSIGN(TouchpadTapSuppressionController); |
65 }; | 68 }; |
66 | 69 |
67 } // namespace content | 70 } // namespace content |
68 | 71 |
69 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCHPAD_TAP_SUPPRESSION_CONTROLL
ER_H_ | 72 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCHPAD_TAP_SUPPRESSION_CONTROLL
ER_H_ |
OLD | NEW |