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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ACK_HANDLER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ACK_HANDLER_H_
8 #include "base/basictypes.h"
9 #include "content/browser/renderer_host/event_with_latency_info.h"
10 #include "content/common/input/input_event_ack_state.h"
11 #include "content/public/browser/native_web_keyboard_event.h"
12 #include "third_party/WebKit/public/web/WebInputEvent.h"
16 // Provided customized ack response for input events.
17 class CONTENT_EXPORT InputAckHandler
{
19 virtual ~InputAckHandler() {}
21 // Called upon event ack receipt from the renderer.
22 virtual void OnKeyboardEventAck(
23 const NativeWebKeyboardEventWithLatencyInfo
& event
,
24 InputEventAckState ack_result
) = 0;
25 virtual void OnMouseEventAck(const MouseEventWithLatencyInfo
& event
,
26 InputEventAckState ack_result
) = 0;
27 virtual void OnWheelEventAck(const MouseWheelEventWithLatencyInfo
& event
,
28 InputEventAckState ack_result
) = 0;
29 virtual void OnTouchEventAck(const TouchEventWithLatencyInfo
& event
,
30 InputEventAckState ack_result
) = 0;
31 virtual void OnGestureEventAck(const GestureEventWithLatencyInfo
& event
,
32 InputEventAckState ack_result
) = 0;
34 enum UnexpectedEventAckType
{
36 UNEXPECTED_EVENT_TYPE
,
39 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type
) = 0;
42 } // namespace content
44 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ACK_HANDLER_H_