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

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

Issue 657803002: Update touch selection to only modify one selection point at a time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix DCHECK Created 6 years, 2 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
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 InputEventAckState ack_result) override; 92 InputEventAckState ack_result) override;
93 93
94 // GetureEventFilterClient 94 // GetureEventFilterClient
95 virtual void SendGestureEventImmediately( 95 virtual void SendGestureEventImmediately(
96 const GestureEventWithLatencyInfo& gesture_event) override; 96 const GestureEventWithLatencyInfo& gesture_event) override;
97 virtual void OnGestureEventAck(const GestureEventWithLatencyInfo& event, 97 virtual void OnGestureEventAck(const GestureEventWithLatencyInfo& event,
98 InputEventAckState ack_result) override; 98 InputEventAckState ack_result) override;
99 99
100 bool SendMoveCaret(scoped_ptr<IPC::Message> message); 100 bool SendMoveCaret(scoped_ptr<IPC::Message> message);
101 bool SendSelectRange(scoped_ptr<IPC::Message> message); 101 bool SendSelectRange(scoped_ptr<IPC::Message> message);
102 bool SendMoveRangeSelectionExtent(scoped_ptr<IPC::Message> message);
102 bool Send(IPC::Message* message); 103 bool Send(IPC::Message* message);
103 104
104 // Filters and forwards |input_event| to the appropriate handler. 105 // Filters and forwards |input_event| to the appropriate handler.
105 void FilterAndSendWebInputEvent(const blink::WebInputEvent& input_event, 106 void FilterAndSendWebInputEvent(const blink::WebInputEvent& input_event,
106 const ui::LatencyInfo& latency_info, 107 const ui::LatencyInfo& latency_info,
107 bool is_keyboard_shortcut); 108 bool is_keyboard_shortcut);
108 109
109 // Utility routine for filtering and forwarding |input_event| to the 110 // Utility routine for filtering and forwarding |input_event| to the
110 // appropriate handler. |input_event| will be offered to the overscroll 111 // appropriate handler. |input_event| will be offered to the overscroll
111 // controller, client and renderer, in that order. 112 // controller, client and renderer, in that order.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // Given a Touchpad GesturePinchUpdate event, create and send a synthetic 146 // Given a Touchpad GesturePinchUpdate event, create and send a synthetic
146 // wheel event for it. 147 // wheel event for it.
147 void SendSyntheticWheelEventForPinch( 148 void SendSyntheticWheelEventForPinch(
148 const GestureEventWithLatencyInfo& pinch_event); 149 const GestureEventWithLatencyInfo& pinch_event);
149 150
150 // IPC message handlers 151 // IPC message handlers
151 void OnInputEventAck(const InputHostMsg_HandleInputEvent_ACK_Params& ack); 152 void OnInputEventAck(const InputHostMsg_HandleInputEvent_ACK_Params& ack);
152 void OnDidOverscroll(const DidOverscrollParams& params); 153 void OnDidOverscroll(const DidOverscrollParams& params);
153 void OnMsgMoveCaretAck(); 154 void OnMsgMoveCaretAck();
154 void OnSelectRangeAck(); 155 void OnSelectRangeAck();
156 void OnMoveRangeSelectionExtentAck();
155 void OnHasTouchEventHandlers(bool has_handlers); 157 void OnHasTouchEventHandlers(bool has_handlers);
156 void OnSetTouchAction(TouchAction touch_action); 158 void OnSetTouchAction(TouchAction touch_action);
157 159
158 // Indicates the source of an ack provided to |ProcessInputEventAck()|. 160 // Indicates the source of an ack provided to |ProcessInputEventAck()|.
159 // The source is tracked by |current_ack_source_|, which aids in ack routing. 161 // The source is tracked by |current_ack_source_|, which aids in ack routing.
160 enum AckSource { 162 enum AckSource {
161 RENDERER, 163 RENDERER,
162 CLIENT, 164 CLIENT,
163 IGNORING_DISPOSITION, 165 IGNORING_DISPOSITION,
164 ACK_SOURCE_NONE 166 ACK_SOURCE_NONE
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 InputRouterClient* client_; 216 InputRouterClient* client_;
215 InputAckHandler* ack_handler_; 217 InputAckHandler* ack_handler_;
216 int routing_id_; 218 int routing_id_;
217 219
218 // (Similar to |mouse_move_pending_|.) True while waiting for SelectRange_ACK. 220 // (Similar to |mouse_move_pending_|.) True while waiting for SelectRange_ACK.
219 bool select_range_pending_; 221 bool select_range_pending_;
220 222
221 // (Similar to |next_mouse_move_|.) The next SelectRange to send, if any. 223 // (Similar to |next_mouse_move_|.) The next SelectRange to send, if any.
222 scoped_ptr<IPC::Message> next_selection_range_; 224 scoped_ptr<IPC::Message> next_selection_range_;
223 225
226 // (Similar to |mouse_move_pending_|.) True while waiting for
227 // MoveRangeSelectionExtent_ACK.
228 bool move_range_selection_extent_pending_;
229
230 // (Similar to |next_mouse_move_|.) The next MoveRangeSelectionExtent to
231 // send, if any.
232 scoped_ptr<IPC::Message> next_range_selection_extent_move_;
233
224 // (Similar to |mouse_move_pending_|.) True while waiting for MoveCaret_ACK. 234 // (Similar to |mouse_move_pending_|.) True while waiting for MoveCaret_ACK.
225 bool move_caret_pending_; 235 bool move_caret_pending_;
226 236
227 // (Similar to |next_mouse_move_|.) The next MoveCaret to send, if any. 237 // (Similar to |next_mouse_move_|.) The next MoveCaret to send, if any.
228 scoped_ptr<IPC::Message> next_move_caret_; 238 scoped_ptr<IPC::Message> next_move_caret_;
229 239
230 // True if a mouse move event was sent to the render view and we are waiting 240 // True if a mouse move event was sent to the render view and we are waiting
231 // for a corresponding InputHostMsg_HandleInputEvent_ACK message. 241 // for a corresponding InputHostMsg_HandleInputEvent_ACK message.
232 bool mouse_move_pending_; 242 bool mouse_move_pending_;
233 243
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 TouchActionFilter touch_action_filter_; 285 TouchActionFilter touch_action_filter_;
276 InputEventStreamValidator input_stream_validator_; 286 InputEventStreamValidator input_stream_validator_;
277 InputEventStreamValidator output_stream_validator_; 287 InputEventStreamValidator output_stream_validator_;
278 288
279 DISALLOW_COPY_AND_ASSIGN(InputRouterImpl); 289 DISALLOW_COPY_AND_ASSIGN(InputRouterImpl);
280 }; 290 };
281 291
282 } // namespace content 292 } // namespace content
283 293
284 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_ 294 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698