summaryrefslogtreecommitdiffstats
path: root/content/browser/renderer_host/input/input_ack_handler.h
diff options
context:
space:
mode:
authorjdduke@chromium.org <jdduke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-12 00:32:49 +0000
committerjdduke@chromium.org <jdduke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-12 00:32:49 +0000
commit6722816ee73f7002a9452ac93b1f6cbb8de036c9 (patch)
tree673d30a7ca142aa7d2cf06d03e92c25ecb476b78 /content/browser/renderer_host/input/input_ack_handler.h
parent2ac0763be9d8497e34fee49f92f7f0fbebfc17d9 (diff)
downloadchromium_src-6722816ee73f7002a9452ac93b1f6cbb8de036c9.zip
chromium_src-6722816ee73f7002a9452ac93b1f6cbb8de036c9.tar.gz
chromium_src-6722816ee73f7002a9452ac93b1f6cbb8de036c9.tar.bz2
Provided batched input delivery with a BufferedInputRouter
The BufferedInputRouter batches input events into EventPackets. The delivery of these packets is dependent on periodic flush signals, as requested by the InputRouterClient. A given flush involves the forwarding of EventPackets to the renderer until all InputEvents from the original packet have been dispatched. BUG=245499 Review URL: https://chromiumcodereview.appspot.com/20356003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222674 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host/input/input_ack_handler.h')
-rw-r--r--content/browser/renderer_host/input/input_ack_handler.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/content/browser/renderer_host/input/input_ack_handler.h b/content/browser/renderer_host/input/input_ack_handler.h
new file mode 100644
index 0000000..3e09b07
--- /dev/null
+++ b/content/browser/renderer_host/input/input_ack_handler.h
@@ -0,0 +1,41 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ACK_HANDLER_H_
+#define CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ACK_HANDLER_H_
+
+#include "base/basictypes.h"
+#include "content/port/browser/event_with_latency_info.h"
+#include "content/port/common/input_event_ack_state.h"
+#include "content/public/browser/native_web_keyboard_event.h"
+#include "third_party/WebKit/public/web/WebInputEvent.h"
+
+namespace content {
+
+// Provided customized ack response for input events.
+class CONTENT_EXPORT InputAckHandler {
+ public:
+ virtual ~InputAckHandler() {}
+
+ // Called upon event ack receipt from the renderer.
+ virtual void OnKeyboardEventAck(const NativeWebKeyboardEvent& event,
+ InputEventAckState ack_result) = 0;
+ virtual void OnWheelEventAck(const WebKit::WebMouseWheelEvent& event,
+ InputEventAckState ack_result) = 0;
+ virtual void OnTouchEventAck(const TouchEventWithLatencyInfo& event,
+ InputEventAckState ack_result) = 0;
+ virtual void OnGestureEventAck(const WebKit::WebGestureEvent& event,
+ InputEventAckState ack_result) = 0;
+
+ enum UnexpectedEventAckType {
+ UNEXPECTED_ACK,
+ UNEXPECTED_EVENT_TYPE,
+ BAD_ACK_MESSAGE
+ };
+ virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ACK_HANDLER_H_