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

Unified Diff: content/common/input/input_event_utils.h

Issue 19624005: Add InputEvent and EventPacket types for batched input delivery (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
Index: content/common/input/input_event_utils.h
diff --git a/content/common/input/input_event_utils.h b/content/common/input/input_event_utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..1d0a5233a55877d12a46e8aeb2140b0a02ee3f27
--- /dev/null
+++ b/content/common/input/input_event_utils.h
@@ -0,0 +1,44 @@
+// Copyright (c) 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_COMMON_INPUT_INPUT_EVENT_UTILS_H_
+#define CONTENT_COMMON_INPUT_INPUT_EVENT_UTILS_H_
+
+#include "content/common/content_export.h"
+
+namespace IPC {
+class Message;
+}
+
+namespace ui {
+struct LatencyInfo;
+}
+
+namespace WebKit {
+class WebInputEvent;
+}
+
+namespace content {
+
+class EventPacket;
+
+// True of message is of type InputMsg_HandleInputEvent.
+CONTENT_EXPORT bool IsWebInputEventMessage(const IPC::Message& message);
+// |optional_output_is_keyboard_shortcut| may be NULL.
+CONTENT_EXPORT bool CrackWebInputEventMessage(
+ const IPC::Message& message,
+ const WebKit::WebInputEvent** output_event,
+ ui::LatencyInfo* output_latency_info,
+ bool* optional_output_is_keyboard_shortcut);
+
+// True if message is of type InputMsg_HandleEventPacket or
+// InputHostMsg_HandleEventPacket_ACK.
+CONTENT_EXPORT bool IsEventPacketMessage(const IPC::Message& message);
+CONTENT_EXPORT bool CrackEventPacketMessage(
+ const IPC::Message& message,
+ EventPacket* output_packet);
+
+} // namespace content
+
+#endif // CONTENT_COMMON_INPUT_INPUT_EVENT_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698