| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "content/common/input/input_event_dispatch_type.h" | 21 #include "content/common/input/input_event_dispatch_type.h" |
| 22 #include "content/common/input/input_event_stream_validator.h" | 22 #include "content/common/input/input_event_stream_validator.h" |
| 23 #include "content/public/browser/native_web_keyboard_event.h" | 23 #include "content/public/browser/native_web_keyboard_event.h" |
| 24 | 24 |
| 25 namespace IPC { | 25 namespace IPC { |
| 26 class Sender; | 26 class Sender; |
| 27 } | 27 } |
| 28 | 28 |
| 29 namespace ui { | 29 namespace ui { |
| 30 class LatencyInfo; | 30 class LatencyInfo; |
| 31 struct DidOverscrollParams; |
| 31 } | 32 } |
| 32 | 33 |
| 33 namespace content { | 34 namespace content { |
| 34 | 35 |
| 35 class InputAckHandler; | 36 class InputAckHandler; |
| 36 class InputRouterClient; | 37 class InputRouterClient; |
| 37 class OverscrollController; | 38 class OverscrollController; |
| 38 struct DidOverscrollParams; | |
| 39 struct InputEventAck; | 39 struct InputEventAck; |
| 40 | 40 |
| 41 // A default implementation for browser input event routing. | 41 // A default implementation for browser input event routing. |
| 42 class CONTENT_EXPORT InputRouterImpl | 42 class CONTENT_EXPORT InputRouterImpl |
| 43 : public NON_EXPORTED_BASE(InputRouter), | 43 : public NON_EXPORTED_BASE(InputRouter), |
| 44 public NON_EXPORTED_BASE(GestureEventQueueClient), | 44 public NON_EXPORTED_BASE(GestureEventQueueClient), |
| 45 public NON_EXPORTED_BASE(MouseWheelEventQueueClient), | 45 public NON_EXPORTED_BASE(MouseWheelEventQueueClient), |
| 46 public NON_EXPORTED_BASE(TouchEventQueueClient), | 46 public NON_EXPORTED_BASE(TouchEventQueueClient), |
| 47 public NON_EXPORTED_BASE(TouchpadTapSuppressionControllerClient) { | 47 public NON_EXPORTED_BASE(TouchpadTapSuppressionControllerClient) { |
| 48 public: | 48 public: |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 const ui::LatencyInfo& latency_info); | 129 const ui::LatencyInfo& latency_info); |
| 130 | 130 |
| 131 // Returns true if |input_event| was successfully sent to the renderer | 131 // Returns true if |input_event| was successfully sent to the renderer |
| 132 // as an async IPC Message. | 132 // as an async IPC Message. |
| 133 bool OfferToRenderer(const blink::WebInputEvent& input_event, | 133 bool OfferToRenderer(const blink::WebInputEvent& input_event, |
| 134 const ui::LatencyInfo& latency_info, | 134 const ui::LatencyInfo& latency_info, |
| 135 InputEventDispatchType dispatch_type); | 135 InputEventDispatchType dispatch_type); |
| 136 | 136 |
| 137 // IPC message handlers | 137 // IPC message handlers |
| 138 void OnInputEventAck(const InputEventAck& ack); | 138 void OnInputEventAck(const InputEventAck& ack); |
| 139 void OnDidOverscroll(const DidOverscrollParams& params); | 139 void OnDidOverscroll(const ui::DidOverscrollParams& params); |
| 140 void OnMsgMoveCaretAck(); | 140 void OnMsgMoveCaretAck(); |
| 141 void OnSelectMessageAck(); | 141 void OnSelectMessageAck(); |
| 142 void OnHasTouchEventHandlers(bool has_handlers); | 142 void OnHasTouchEventHandlers(bool has_handlers); |
| 143 void OnSetTouchAction(TouchAction touch_action); | 143 void OnSetTouchAction(TouchAction touch_action); |
| 144 void OnDidStopFlinging(); | 144 void OnDidStopFlinging(); |
| 145 | 145 |
| 146 // Indicates the source of an ack provided to |ProcessInputEventAck()|. | 146 // Indicates the source of an ack provided to |ProcessInputEventAck()|. |
| 147 // The source is tracked by |current_ack_source_|, which aids in ack routing. | 147 // The source is tracked by |current_ack_source_|, which aids in ack routing. |
| 148 enum AckSource { | 148 enum AckSource { |
| 149 RENDERER, | 149 RENDERER, |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 InputEventStreamValidator output_stream_validator_; | 258 InputEventStreamValidator output_stream_validator_; |
| 259 | 259 |
| 260 float device_scale_factor_; | 260 float device_scale_factor_; |
| 261 | 261 |
| 262 DISALLOW_COPY_AND_ASSIGN(InputRouterImpl); | 262 DISALLOW_COPY_AND_ASSIGN(InputRouterImpl); |
| 263 }; | 263 }; |
| 264 | 264 |
| 265 } // namespace content | 265 } // namespace content |
| 266 | 266 |
| 267 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_ | 267 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_ |
| OLD | NEW |