| 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_INPUT_ROUTER_CLIENT_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_CLIENT_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_CLIENT_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_CLIENT_H_ |
| 7 | 7 |
| 8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
| 9 #include "content/port/browser/event_with_latency_info.h" | 9 #include "content/port/browser/event_with_latency_info.h" |
| 10 #include "content/port/common/input_event_ack_state.h" | 10 #include "content/port/common/input_event_ack_state.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 const TouchEventWithLatencyInfo& touch_event) = 0; | 54 const TouchEventWithLatencyInfo& touch_event) = 0; |
| 55 virtual bool OnSendGestureEvent( | 55 virtual bool OnSendGestureEvent( |
| 56 const GestureEventWithLatencyInfo& gesture_event) = 0; | 56 const GestureEventWithLatencyInfo& gesture_event) = 0; |
| 57 virtual bool OnSendMouseEventImmediately( | 57 virtual bool OnSendMouseEventImmediately( |
| 58 const MouseEventWithLatencyInfo& mouse_event) = 0; | 58 const MouseEventWithLatencyInfo& mouse_event) = 0; |
| 59 virtual bool OnSendTouchEventImmediately( | 59 virtual bool OnSendTouchEventImmediately( |
| 60 const TouchEventWithLatencyInfo& touch_event) = 0; | 60 const TouchEventWithLatencyInfo& touch_event) = 0; |
| 61 virtual bool OnSendGestureEventImmediately( | 61 virtual bool OnSendGestureEventImmediately( |
| 62 const GestureEventWithLatencyInfo& gesture_event) = 0; | 62 const GestureEventWithLatencyInfo& gesture_event) = 0; |
| 63 | 63 |
| 64 // Called upon event ack receipt from the renderer. | 64 // Certain router implementations require periodic flushing of queued events. |
| 65 virtual void OnKeyboardEventAck(const NativeWebKeyboardEvent& event, | 65 // When this method is called, the client should ensure a timely call, either |
| 66 InputEventAckState ack_result) = 0; | 66 // synchronous or asynchronous, of |Flush| on the InputRouter. |
| 67 virtual void OnWheelEventAck(const WebKit::WebMouseWheelEvent& event, | 67 virtual void SetNeedsFlush() = 0; |
| 68 InputEventAckState ack_result) = 0; | 68 |
| 69 virtual void OnTouchEventAck(const TouchEventWithLatencyInfo& event, | 69 // Called when the router has finished flushing all events queued at the time |
| 70 InputEventAckState ack_result) = 0; | 70 // of the call to Flush. The call will typically be asynchronous with |
| 71 virtual void OnGestureEventAck(const WebKit::WebGestureEvent& event, | 71 // respect to the call to |Flush| on the InputRouter. |
| 72 InputEventAckState ack_result) = 0; | 72 virtual void DidFlush() = 0; |
| 73 virtual void OnUnexpectedEventAck(bool bad_message) = 0; | |
| 74 }; | 73 }; |
| 75 | 74 |
| 76 } // namespace content | 75 } // namespace content |
| 77 | 76 |
| 78 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_CLIENT_H_ | 77 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_CLIENT_H_ |
| OLD | NEW |