Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(784)

Side by Side Diff: content/browser/renderer_host/input/input_router_impl.h

Issue 183923034: Disable the touch ack timeout for touch-action:none (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final cleanup pass Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/input/input_router_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 const ui::LatencyInfo& latency_info, 118 const ui::LatencyInfo& latency_info,
119 bool is_keyboard_shortcut); 119 bool is_keyboard_shortcut);
120 120
121 // IPC message handlers 121 // IPC message handlers
122 void OnInputEventAck(blink::WebInputEvent::Type event_type, 122 void OnInputEventAck(blink::WebInputEvent::Type event_type,
123 InputEventAckState ack_result, 123 InputEventAckState ack_result,
124 const ui::LatencyInfo& latency_info); 124 const ui::LatencyInfo& latency_info);
125 void OnMsgMoveCaretAck(); 125 void OnMsgMoveCaretAck();
126 void OnSelectRangeAck(); 126 void OnSelectRangeAck();
127 void OnHasTouchEventHandlers(bool has_handlers); 127 void OnHasTouchEventHandlers(bool has_handlers);
128 void OnSetTouchAction(content::TouchAction touch_action); 128 void OnSetTouchAction(TouchAction touch_action);
129 129
130 // Indicates the source of an ack provided to |ProcessInputEventAck()|. 130 // Indicates the source of an ack provided to |ProcessInputEventAck()|.
131 // The source is tracked by |current_ack_source_|, which aids in ack routing. 131 // The source is tracked by |current_ack_source_|, which aids in ack routing.
132 enum AckSource { 132 enum AckSource {
133 RENDERER, 133 RENDERER,
134 CLIENT, 134 CLIENT,
135 OVERSCROLL_CONTROLLER, 135 OVERSCROLL_CONTROLLER,
136 IGNORING_DISPOSITION, 136 IGNORING_DISPOSITION,
137 ACK_SOURCE_NONE 137 ACK_SOURCE_NONE
138 }; 138 };
(...skipping 28 matching lines...) Expand all
167 void ProcessTouchAck(InputEventAckState ack_result, 167 void ProcessTouchAck(InputEventAckState ack_result,
168 const ui::LatencyInfo& latency); 168 const ui::LatencyInfo& latency);
169 169
170 // Forwards |ack_result| to the client's OverscrollController, if necessary. 170 // Forwards |ack_result| to the client's OverscrollController, if necessary.
171 void ProcessAckForOverscroll(const blink::WebInputEvent& event, 171 void ProcessAckForOverscroll(const blink::WebInputEvent& event,
172 InputEventAckState ack_result); 172 InputEventAckState ack_result);
173 173
174 void SimulateTouchGestureWithMouse( 174 void SimulateTouchGestureWithMouse(
175 const MouseEventWithLatencyInfo& mouse_event); 175 const MouseEventWithLatencyInfo& mouse_event);
176 176
177 // Called when a touch timeout-affecting bit has changed, in turn toggling the
178 // touch ack timeout feature of the |touch_event_queue_| as appropriate. Input
179 // to that determination includes current view properties, the allowed touch
180 // action and the command-line configured |touch_ack_timeout_supported_|.
181 void UpdateTouchAckTimeoutEnabled();
182
177 bool IsInOverscrollGesture() const; 183 bool IsInOverscrollGesture() const;
178 184
179 int routing_id() const { return routing_id_; } 185 int routing_id() const { return routing_id_; }
180 186
181 187
182 IPC::Sender* sender_; 188 IPC::Sender* sender_;
183 InputRouterClient* client_; 189 InputRouterClient* client_;
184 InputAckHandler* ack_handler_; 190 InputAckHandler* ack_handler_;
185 int routing_id_; 191 int routing_id_;
186 192
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 231
226 // Queue of keyboard events that we need to track. 232 // Queue of keyboard events that we need to track.
227 typedef std::deque<NativeWebKeyboardEvent> KeyQueue; 233 typedef std::deque<NativeWebKeyboardEvent> KeyQueue;
228 234
229 // A queue of keyboard events. We can't trust data from the renderer so we 235 // A queue of keyboard events. We can't trust data from the renderer so we
230 // stuff key events into a queue and pop them out on ACK, feeding our copy 236 // stuff key events into a queue and pop them out on ACK, feeding our copy
231 // back to whatever unhandled handler instead of the returned version. 237 // back to whatever unhandled handler instead of the returned version.
232 KeyQueue key_queue_; 238 KeyQueue key_queue_;
233 239
234 // Whether touch ack timeout handling has been enabled via the command line. 240 // Whether touch ack timeout handling has been enabled via the command line.
235 bool touch_ack_timeout_enabled_; 241 bool touch_ack_timeout_supported_;
236 size_t touch_ack_timeout_delay_ms_; 242 size_t touch_ack_timeout_delay_ms_;
237 243
244 // Cached flags from |OnViewUpdated()|, defaults to 0.
245 int current_view_flags_;
246
238 // The source of the ack within the scope of |ProcessInputEventAck()|. 247 // The source of the ack within the scope of |ProcessInputEventAck()|.
239 // Defaults to ACK_SOURCE_NONE. 248 // Defaults to ACK_SOURCE_NONE.
240 AckSource current_ack_source_; 249 AckSource current_ack_source_;
241 250
242 scoped_ptr<TouchEventQueue> touch_event_queue_; 251 scoped_ptr<TouchEventQueue> touch_event_queue_;
243 scoped_ptr<GestureEventQueue> gesture_event_queue_; 252 scoped_ptr<GestureEventQueue> gesture_event_queue_;
244 TouchActionFilter touch_action_filter_; 253 TouchActionFilter touch_action_filter_;
245 InputEventStreamValidator event_stream_validator_; 254 InputEventStreamValidator event_stream_validator_;
246 255
247 DISALLOW_COPY_AND_ASSIGN(InputRouterImpl); 256 DISALLOW_COPY_AND_ASSIGN(InputRouterImpl);
248 }; 257 };
249 258
250 } // namespace content 259 } // namespace content
251 260
252 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_ 261 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/input/input_router_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698