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

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

Issue 19670007: Send input event's LatencyInfo back from renderer to browser when acked (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix compile error in immediate_input_router_unittest.cc Created 7 years, 4 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/immediate_input_router.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_IMMEDIATE_INPUT_ROUTER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_IMMEDIATE_INPUT_ROUTER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_IMMEDIATE_INPUT_ROUTER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_IMMEDIATE_INPUT_ROUTER_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 bool is_keyboard_shortcut); 88 bool is_keyboard_shortcut);
89 89
90 // Filters and forwards the given WebInputEvent to |SendWebInputEvent()|. This 90 // Filters and forwards the given WebInputEvent to |SendWebInputEvent()|. This
91 // is an internal helper for |Send*Event()| and should not be used otherwise. 91 // is an internal helper for |Send*Event()| and should not be used otherwise.
92 void FilterAndSendWebInputEvent(const WebKit::WebInputEvent& input_event, 92 void FilterAndSendWebInputEvent(const WebKit::WebInputEvent& input_event,
93 const ui::LatencyInfo& latency_info, 93 const ui::LatencyInfo& latency_info,
94 bool is_keyboard_shortcut); 94 bool is_keyboard_shortcut);
95 95
96 // IPC message handlers 96 // IPC message handlers
97 void OnInputEventAck(WebKit::WebInputEvent::Type event_type, 97 void OnInputEventAck(WebKit::WebInputEvent::Type event_type,
98 InputEventAckState ack_result); 98 InputEventAckState ack_result,
99 const ui::LatencyInfo& latency_info);
99 void OnMsgMoveCaretAck(); 100 void OnMsgMoveCaretAck();
100 void OnSelectRangeAck(); 101 void OnSelectRangeAck();
101 void OnHasTouchEventHandlers(bool has_handlers); 102 void OnHasTouchEventHandlers(bool has_handlers);
102 103
103 // Handle the event ack. Triggered via |OnInputEventAck()| if the event was 104 // Handle the event ack. Triggered via |OnInputEventAck()| if the event was
104 // processed in the renderer, or synchonously from |FilterAndSendInputevent()| 105 // processed in the renderer, or synchonously from |FilterAndSendInputevent()|
105 // if the event was filtered by the |client_| prior to sending. 106 // if the event was filtered by the |client_| prior to sending.
106 void ProcessInputEventAck(WebKit::WebInputEvent::Type event_type, 107 void ProcessInputEventAck(WebKit::WebInputEvent::Type event_type,
107 InputEventAckState ack_result); 108 InputEventAckState ack_result,
109 const ui::LatencyInfo& latency_info);
108 110
109 // Called by ProcessInputEventAck() to process a keyboard event ack message. 111 // Called by ProcessInputEventAck() to process a keyboard event ack message.
110 void ProcessKeyboardAck(int type, InputEventAckState ack_result); 112 void ProcessKeyboardAck(int type, InputEventAckState ack_result);
111 113
112 // Called by ProcessInputEventAck() to process a wheel event ack message. 114 // Called by ProcessInputEventAck() to process a wheel event ack message.
113 // This could result in a task being posted to allow additional wheel 115 // This could result in a task being posted to allow additional wheel
114 // input messages to be coalesced. 116 // input messages to be coalesced.
115 void ProcessWheelAck(InputEventAckState ack_result); 117 void ProcessWheelAck(InputEventAckState ack_result);
116 118
117 // Called by ProcessInputEventAck() to process a gesture event ack message. 119 // Called by ProcessInputEventAck() to process a gesture event ack message.
118 // This validates the gesture for suppression of touchpad taps and sends one 120 // This validates the gesture for suppression of touchpad taps and sends one
119 // previously queued coalesced gesture if it exists. 121 // previously queued coalesced gesture if it exists.
120 void ProcessGestureAck(int type, InputEventAckState ack_result); 122 void ProcessGestureAck(int type, InputEventAckState ack_result);
121 123
122 // Called on ProcessInputEventAck() to process a touch event ack message. 124 // Called on ProcessInputEventAck() to process a touch event ack message.
123 // This can result in a gesture event being generated and sent back to the 125 // This can result in a gesture event being generated and sent back to the
124 // renderer. 126 // renderer.
125 void ProcessTouchAck(InputEventAckState ack_result); 127 void ProcessTouchAck(InputEventAckState ack_result,
128 const ui::LatencyInfo& latency_info);
126 129
127 int routing_id() const { return routing_id_; } 130 int routing_id() const { return routing_id_; }
128 131
129 132
130 RenderProcessHost* process_; 133 RenderProcessHost* process_;
131 InputRouterClient* client_; 134 InputRouterClient* client_;
132 int routing_id_; 135 int routing_id_;
133 136
134 // (Similar to |mouse_move_pending_|.) True while waiting for SelectRange_ACK. 137 // (Similar to |mouse_move_pending_|.) True while waiting for SelectRange_ACK.
135 bool select_range_pending_; 138 bool select_range_pending_;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 188
186 scoped_ptr<TouchEventQueue> touch_event_queue_; 189 scoped_ptr<TouchEventQueue> touch_event_queue_;
187 scoped_ptr<GestureEventFilter> gesture_event_filter_; 190 scoped_ptr<GestureEventFilter> gesture_event_filter_;
188 191
189 DISALLOW_COPY_AND_ASSIGN(ImmediateInputRouter); 192 DISALLOW_COPY_AND_ASSIGN(ImmediateInputRouter);
190 }; 193 };
191 194
192 } // namespace content 195 } // namespace content
193 196
194 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_IMMEDIATE_INPUT_ROUTER_H_ 197 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_IMMEDIATE_INPUT_ROUTER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/input/immediate_input_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698