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; | 21 struct InputHostMsg_HandleInputEvent_ACK_Params; |
| 22 struct InputHostMsg_HandleUncancelableTouchMoveEvent_ACK_Params; |
22 | 23 |
23 namespace IPC { | 24 namespace IPC { |
24 class Sender; | 25 class Sender; |
25 } | 26 } |
26 | 27 |
27 namespace ui { | 28 namespace ui { |
28 struct LatencyInfo; | 29 struct LatencyInfo; |
29 } | 30 } |
30 | 31 |
31 namespace content { | 32 namespace content { |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 const ui::LatencyInfo& latency_info); | 119 const ui::LatencyInfo& latency_info); |
119 | 120 |
120 // Returns true if |input_event| was successfully sent to the renderer | 121 // Returns true if |input_event| was successfully sent to the renderer |
121 // as an async IPC Message. | 122 // as an async IPC Message. |
122 bool OfferToRenderer(const blink::WebInputEvent& input_event, | 123 bool OfferToRenderer(const blink::WebInputEvent& input_event, |
123 const ui::LatencyInfo& latency_info, | 124 const ui::LatencyInfo& latency_info, |
124 bool is_keyboard_shortcut); | 125 bool is_keyboard_shortcut); |
125 | 126 |
126 // IPC message handlers | 127 // IPC message handlers |
127 void OnInputEventAck(const InputHostMsg_HandleInputEvent_ACK_Params& ack); | 128 void OnInputEventAck(const InputHostMsg_HandleInputEvent_ACK_Params& ack); |
| 129 void OnUncancelableTouchMoveAck( |
| 130 const InputHostMsg_HandleUncancelableTouchMoveEvent_ACK_Params& ack); |
128 void OnDidOverscroll(const DidOverscrollParams& params); | 131 void OnDidOverscroll(const DidOverscrollParams& params); |
129 void OnMsgMoveCaretAck(); | 132 void OnMsgMoveCaretAck(); |
130 void OnSelectMessageAck(); | 133 void OnSelectMessageAck(); |
131 void OnHasTouchEventHandlers(bool has_handlers); | 134 void OnHasTouchEventHandlers(bool has_handlers); |
132 void OnSetTouchAction(TouchAction touch_action); | 135 void OnSetTouchAction(TouchAction touch_action); |
133 | 136 |
134 // Indicates the source of an ack provided to |ProcessInputEventAck()|. | 137 // Indicates the source of an ack provided to |ProcessInputEventAck()|. |
135 // The source is tracked by |current_ack_source_|, which aids in ack routing. | 138 // The source is tracked by |current_ack_source_|, which aids in ack routing. |
136 enum AckSource { | 139 enum AckSource { |
137 RENDERER, | 140 RENDERER, |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 TouchActionFilter touch_action_filter_; | 256 TouchActionFilter touch_action_filter_; |
254 InputEventStreamValidator input_stream_validator_; | 257 InputEventStreamValidator input_stream_validator_; |
255 InputEventStreamValidator output_stream_validator_; | 258 InputEventStreamValidator output_stream_validator_; |
256 | 259 |
257 DISALLOW_COPY_AND_ASSIGN(InputRouterImpl); | 260 DISALLOW_COPY_AND_ASSIGN(InputRouterImpl); |
258 }; | 261 }; |
259 | 262 |
260 } // namespace content | 263 } // namespace content |
261 | 264 |
262 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_ | 265 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_ |
OLD | NEW |