| 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_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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 bool is_keyboard_shortcut); | 87 bool is_keyboard_shortcut); |
| 88 | 88 |
| 89 // Filters and forwards the given WebInputEvent to |SendWebInputEvent()|. This | 89 // Filters and forwards the given WebInputEvent to |SendWebInputEvent()|. This |
| 90 // is an internal helper for |Send*Event()| and should not be used otherwise. | 90 // is an internal helper for |Send*Event()| and should not be used otherwise. |
| 91 void FilterAndSendWebInputEvent(const WebKit::WebInputEvent& input_event, | 91 void FilterAndSendWebInputEvent(const WebKit::WebInputEvent& input_event, |
| 92 const ui::LatencyInfo& latency_info, | 92 const ui::LatencyInfo& latency_info, |
| 93 bool is_keyboard_shortcut); | 93 bool is_keyboard_shortcut); |
| 94 | 94 |
| 95 // IPC message handlers | 95 // IPC message handlers |
| 96 void OnInputEventAck(WebKit::WebInputEvent::Type event_type, | 96 void OnInputEventAck(WebKit::WebInputEvent::Type event_type, |
| 97 InputEventAckState ack_result); | 97 InputEventAckState ack_result, |
| 98 const ui::LatencyInfo& latency_info); |
| 98 void OnMsgMoveCaretAck(); | 99 void OnMsgMoveCaretAck(); |
| 99 void OnSelectRangeAck(); | 100 void OnSelectRangeAck(); |
| 100 void OnHasTouchEventHandlers(bool has_handlers); | 101 void OnHasTouchEventHandlers(bool has_handlers); |
| 101 | 102 |
| 102 // Handle the event ack. Triggered via |OnInputEventAck()| if the event was | 103 // Handle the event ack. Triggered via |OnInputEventAck()| if the event was |
| 103 // processed in the renderer, or synchonously from |FilterAndSendInputevent()| | 104 // processed in the renderer, or synchonously from |FilterAndSendInputevent()| |
| 104 // if the event was filtered by the |client_| prior to sending. | 105 // if the event was filtered by the |client_| prior to sending. |
| 105 void ProcessInputEventAck(WebKit::WebInputEvent::Type event_type, | 106 void ProcessInputEventAck(WebKit::WebInputEvent::Type event_type, |
| 106 InputEventAckState ack_result); | 107 InputEventAckState ack_result, |
| 108 const ui::LatencyInfo& latency_info); |
| 107 | 109 |
| 108 // Called by ProcessInputEventAck() to process a keyboard event ack message. | 110 // Called by ProcessInputEventAck() to process a keyboard event ack message. |
| 109 void ProcessKeyboardAck(int type, InputEventAckState ack_result); | 111 void ProcessKeyboardAck(int type, InputEventAckState ack_result); |
| 110 | 112 |
| 111 // Called by ProcessInputEventAck() to process a wheel event ack message. | 113 // Called by ProcessInputEventAck() to process a wheel event ack message. |
| 112 // This could result in a task being posted to allow additional wheel | 114 // This could result in a task being posted to allow additional wheel |
| 113 // input messages to be coalesced. | 115 // input messages to be coalesced. |
| 114 void ProcessWheelAck(InputEventAckState ack_result); | 116 void ProcessWheelAck(InputEventAckState ack_result); |
| 115 | 117 |
| 116 // Called by ProcessInputEventAck() to process a gesture event ack message. | 118 // Called by ProcessInputEventAck() to process a gesture event ack message. |
| 117 // This validates the gesture for suppression of touchpad taps and sends one | 119 // This validates the gesture for suppression of touchpad taps and sends one |
| 118 // previously queued coalesced gesture if it exists. | 120 // previously queued coalesced gesture if it exists. |
| 119 void ProcessGestureAck(int type, InputEventAckState ack_result); | 121 void ProcessGestureAck(int type, InputEventAckState ack_result); |
| 120 | 122 |
| 121 // Called on ProcessInputEventAck() to process a touch event ack message. | 123 // Called on ProcessInputEventAck() to process a touch event ack message. |
| 122 // This can result in a gesture event being generated and sent back to the | 124 // This can result in a gesture event being generated and sent back to the |
| 123 // renderer. | 125 // renderer. |
| 124 void ProcessTouchAck(InputEventAckState ack_result); | 126 void ProcessTouchAck(InputEventAckState ack_result, |
| 127 const ui::LatencyInfo& latency_info); |
| 125 | 128 |
| 126 int routing_id() const { return routing_id_; } | 129 int routing_id() const { return routing_id_; } |
| 127 | 130 |
| 128 | 131 |
| 129 RenderProcessHost* process_; | 132 RenderProcessHost* process_; |
| 130 InputRouterClient* client_; | 133 InputRouterClient* client_; |
| 131 int routing_id_; | 134 int routing_id_; |
| 132 | 135 |
| 133 // (Similar to |mouse_move_pending_|.) True while waiting for SelectRange_ACK. | 136 // (Similar to |mouse_move_pending_|.) True while waiting for SelectRange_ACK. |
| 134 bool select_range_pending_; | 137 bool select_range_pending_; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 187 |
| 185 scoped_ptr<TouchEventQueue> touch_event_queue_; | 188 scoped_ptr<TouchEventQueue> touch_event_queue_; |
| 186 scoped_ptr<GestureEventFilter> gesture_event_filter_; | 189 scoped_ptr<GestureEventFilter> gesture_event_filter_; |
| 187 | 190 |
| 188 DISALLOW_COPY_AND_ASSIGN(ImmediateInputRouter); | 191 DISALLOW_COPY_AND_ASSIGN(ImmediateInputRouter); |
| 189 }; | 192 }; |
| 190 | 193 |
| 191 } // namespace content | 194 } // namespace content |
| 192 | 195 |
| 193 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_IMMEDIATE_INPUT_ROUTER_H_ | 196 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_IMMEDIATE_INPUT_ROUTER_H_ |
| OLD | NEW |