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

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: Address issues and add tests Created 6 years, 1 month 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 virtual void OnTouchEventAck(const TouchEventWithLatencyInfo& event, 91 virtual void OnTouchEventAck(const TouchEventWithLatencyInfo& event,
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 SendSelectMessage(scoped_ptr<IPC::Message> message);
102 bool Send(IPC::Message* message); 102 bool Send(IPC::Message* message);
103 103
104 // Filters and forwards |input_event| to the appropriate handler. 104 // Filters and forwards |input_event| to the appropriate handler.
105 void FilterAndSendWebInputEvent(const blink::WebInputEvent& input_event, 105 void FilterAndSendWebInputEvent(const blink::WebInputEvent& input_event,
106 const ui::LatencyInfo& latency_info, 106 const ui::LatencyInfo& latency_info,
107 bool is_keyboard_shortcut); 107 bool is_keyboard_shortcut);
108 108
109 // Utility routine for filtering and forwarding |input_event| to the 109 // Utility routine for filtering and forwarding |input_event| to the
110 // appropriate handler. |input_event| will be offered to the overscroll 110 // appropriate handler. |input_event| will be offered to the overscroll
111 // controller, client and renderer, in that order. 111 // controller, client and renderer, in that order.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 // Given a Touchpad GesturePinchUpdate event, create and send a synthetic 145 // Given a Touchpad GesturePinchUpdate event, create and send a synthetic
146 // wheel event for it. 146 // wheel event for it.
147 void SendSyntheticWheelEventForPinch( 147 void SendSyntheticWheelEventForPinch(
148 const GestureEventWithLatencyInfo& pinch_event); 148 const GestureEventWithLatencyInfo& pinch_event);
149 149
150 // IPC message handlers 150 // IPC message handlers
151 void OnInputEventAck(const InputHostMsg_HandleInputEvent_ACK_Params& ack); 151 void OnInputEventAck(const InputHostMsg_HandleInputEvent_ACK_Params& ack);
152 void OnDidOverscroll(const DidOverscrollParams& params); 152 void OnDidOverscroll(const DidOverscrollParams& params);
153 void OnMsgMoveCaretAck(); 153 void OnMsgMoveCaretAck();
154 void OnSelectRangeAck(); 154 void OnSelectMessageAck();
155 void OnHasTouchEventHandlers(bool has_handlers); 155 void OnHasTouchEventHandlers(bool has_handlers);
156 void OnSetTouchAction(TouchAction touch_action); 156 void OnSetTouchAction(TouchAction touch_action);
157 157
158 // Indicates the source of an ack provided to |ProcessInputEventAck()|. 158 // Indicates the source of an ack provided to |ProcessInputEventAck()|.
159 // The source is tracked by |current_ack_source_|, which aids in ack routing. 159 // The source is tracked by |current_ack_source_|, which aids in ack routing.
160 enum AckSource { 160 enum AckSource {
161 RENDERER, 161 RENDERER,
162 CLIENT, 162 CLIENT,
163 IGNORING_DISPOSITION, 163 IGNORING_DISPOSITION,
164 ACK_SOURCE_NONE 164 ACK_SOURCE_NONE
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 bool IsInOverscrollGesture() const; 208 bool IsInOverscrollGesture() const;
209 209
210 int routing_id() const { return routing_id_; } 210 int routing_id() const { return routing_id_; }
211 211
212 212
213 IPC::Sender* sender_; 213 IPC::Sender* sender_;
214 InputRouterClient* client_; 214 InputRouterClient* client_;
215 InputAckHandler* ack_handler_; 215 InputAckHandler* ack_handler_;
216 int routing_id_; 216 int routing_id_;
217 217
218 // (Similar to |mouse_move_pending_|.) True while waiting for SelectRange_ACK. 218 // (Similar to |mouse_move_pending_|.) True while waiting for SelectRange_ACK
219 bool select_range_pending_; 219 // or MoveRangeSelectionExtent_ACK.
220 bool select_message_pending_;
220 221
221 // (Similar to |next_mouse_move_|.) The next SelectRange to send, if any. 222 // Queue of pending select messages to send after receving the next select
222 scoped_ptr<IPC::Message> next_selection_range_; 223 // message ack.
224 std::deque<IPC::Message*> pending_select_messages_;
223 225
224 // (Similar to |mouse_move_pending_|.) True while waiting for MoveCaret_ACK. 226 // (Similar to |mouse_move_pending_|.) True while waiting for MoveCaret_ACK.
225 bool move_caret_pending_; 227 bool move_caret_pending_;
226 228
227 // (Similar to |next_mouse_move_|.) The next MoveCaret to send, if any. 229 // (Similar to |next_mouse_move_|.) The next MoveCaret to send, if any.
228 scoped_ptr<IPC::Message> next_move_caret_; 230 scoped_ptr<IPC::Message> next_move_caret_;
229 231
230 // True if a mouse move event was sent to the render view and we are waiting 232 // True if a mouse move event was sent to the render view and we are waiting
231 // for a corresponding InputHostMsg_HandleInputEvent_ACK message. 233 // for a corresponding InputHostMsg_HandleInputEvent_ACK message.
232 bool mouse_move_pending_; 234 bool mouse_move_pending_;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 TouchActionFilter touch_action_filter_; 277 TouchActionFilter touch_action_filter_;
276 InputEventStreamValidator input_stream_validator_; 278 InputEventStreamValidator input_stream_validator_;
277 InputEventStreamValidator output_stream_validator_; 279 InputEventStreamValidator output_stream_validator_;
278 280
279 DISALLOW_COPY_AND_ASSIGN(InputRouterImpl); 281 DISALLOW_COPY_AND_ASSIGN(InputRouterImpl);
280 }; 282 };
281 283
282 } // namespace content 284 } // namespace content
283 285
284 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_ 286 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698