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_INPUT_ROUTER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 namespace ui { | 25 namespace ui { |
26 struct LatencyInfo; | 26 struct LatencyInfo; |
27 } | 27 } |
28 | 28 |
29 namespace content { | 29 namespace content { |
30 | 30 |
31 class InputAckHandler; | 31 class InputAckHandler; |
32 class InputRouterClient; | 32 class InputRouterClient; |
33 class OverscrollController; | 33 class OverscrollController; |
34 class RenderWidgetHostImpl; | 34 class RenderWidgetHostImpl; |
| 35 struct DidOverscrollParams; |
| 36 struct InputEventAck; |
35 | 37 |
36 // A default implementation for browser input event routing. | 38 // A default implementation for browser input event routing. |
37 class CONTENT_EXPORT InputRouterImpl | 39 class CONTENT_EXPORT InputRouterImpl |
38 : public NON_EXPORTED_BASE(InputRouter), | 40 : public NON_EXPORTED_BASE(InputRouter), |
39 public NON_EXPORTED_BASE(GestureEventQueueClient), | 41 public NON_EXPORTED_BASE(GestureEventQueueClient), |
40 public NON_EXPORTED_BASE(TouchEventQueueClient), | 42 public NON_EXPORTED_BASE(TouchEventQueueClient), |
41 public NON_EXPORTED_BASE(TouchpadTapSuppressionControllerClient) { | 43 public NON_EXPORTED_BASE(TouchpadTapSuppressionControllerClient) { |
42 public: | 44 public: |
43 struct CONTENT_EXPORT Config { | 45 struct CONTENT_EXPORT Config { |
44 Config(); | 46 Config(); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 141 |
140 // Enqueue or send a mouse wheel event. | 142 // Enqueue or send a mouse wheel event. |
141 void SendWheelEvent(const QueuedWheelEvent& wheel_event); | 143 void SendWheelEvent(const QueuedWheelEvent& wheel_event); |
142 | 144 |
143 // Given a Touchpad GesturePinchUpdate event, create and send a synthetic | 145 // Given a Touchpad GesturePinchUpdate event, create and send a synthetic |
144 // wheel event for it. | 146 // wheel event for it. |
145 void SendSyntheticWheelEventForPinch( | 147 void SendSyntheticWheelEventForPinch( |
146 const GestureEventWithLatencyInfo& pinch_event); | 148 const GestureEventWithLatencyInfo& pinch_event); |
147 | 149 |
148 // IPC message handlers | 150 // IPC message handlers |
149 void OnInputEventAck(blink::WebInputEvent::Type event_type, | 151 void OnInputEventAck(const InputEventAck& ack); |
150 InputEventAckState ack_result, | 152 void OnDidOverscroll(const DidOverscrollParams& params); |
151 const ui::LatencyInfo& latency_info); | |
152 void OnMsgMoveCaretAck(); | 153 void OnMsgMoveCaretAck(); |
153 void OnSelectRangeAck(); | 154 void OnSelectRangeAck(); |
154 void OnHasTouchEventHandlers(bool has_handlers); | 155 void OnHasTouchEventHandlers(bool has_handlers); |
155 void OnSetTouchAction(TouchAction touch_action); | 156 void OnSetTouchAction(TouchAction touch_action); |
156 | 157 |
157 // Indicates the source of an ack provided to |ProcessInputEventAck()|. | 158 // Indicates the source of an ack provided to |ProcessInputEventAck()|. |
158 // The source is tracked by |current_ack_source_|, which aids in ack routing. | 159 // The source is tracked by |current_ack_source_|, which aids in ack routing. |
159 enum AckSource { | 160 enum AckSource { |
160 RENDERER, | 161 RENDERER, |
161 CLIENT, | 162 CLIENT, |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 GestureEventQueue gesture_event_queue_; | 281 GestureEventQueue gesture_event_queue_; |
281 TouchActionFilter touch_action_filter_; | 282 TouchActionFilter touch_action_filter_; |
282 InputEventStreamValidator event_stream_validator_; | 283 InputEventStreamValidator event_stream_validator_; |
283 | 284 |
284 DISALLOW_COPY_AND_ASSIGN(InputRouterImpl); | 285 DISALLOW_COPY_AND_ASSIGN(InputRouterImpl); |
285 }; | 286 }; |
286 | 287 |
287 } // namespace content | 288 } // namespace content |
288 | 289 |
289 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_ | 290 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_ |
OLD | NEW |