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

Unified Diff: content/common/input/web_event.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: Separate InputEvent types for events based on WebKit::WebInputEvent 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/web_event.h
diff --git a/content/common/input/web_event.h b/content/common/input/web_event.h
new file mode 100644
index 0000000000000000000000000000000000000000..58a7dcee3733aa3b678df4cf50cdff5dbe06344d
--- /dev/null
+++ b/content/common/input/web_event.h
@@ -0,0 +1,47 @@
+// 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_WEB_EVENT_H_
+#define CONTENT_COMMON_INPUT_WEB_EVENT_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "content/common/content_export.h"
+#include "content/common/input/input_event.h"
+#include "ui/base/latency_info.h"
+
+namespace WebKit {
+class WebInputEvent;
+}
+
+namespace content {
+
+// Events based on WebKit::WebInputEvent-derivatives.
+class CONTENT_EXPORT WebEvent : public InputEvent {
+ public:
+ static scoped_ptr<WebEvent> Create();
+ static scoped_ptr<WebEvent> Create(int64 id,
+ const WebKit::WebInputEvent& event,
+ const ui::LatencyInfo& latency_info,
+ bool is_keyboard_shortcut,
+ bool creates_followup_events);
+
+ void SetAll(const WebKit::WebInputEvent& event,
+ const ui::LatencyInfo& latency_info,
+ bool is_keyboard_shortcut,
+ bool creates_followup_events);
+
+ scoped_ptr<WebKit::WebInputEvent> event;
+ ui::LatencyInfo latency_info;
+ bool is_keyboard_shortcut;
+ bool creates_followup_events;
+
+ static const WebEvent* EventCast(const InputEvent* event);
+
+protected:
+ WebEvent(int64 id);
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_INPUT_WEB_EVENT_H_

Powered by Google App Engine
This is Rietveld 408576698