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