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

Unified Diff: content/browser/renderer_host/event_with_latency_info.h

Issue 13931009: Add latency info to input events sent to RenderWidget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
« no previous file with comments | « no previous file | content/browser/renderer_host/gesture_event_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/event_with_latency_info.h
diff --git a/content/browser/renderer_host/event_with_latency_info.h b/content/browser/renderer_host/event_with_latency_info.h
new file mode 100644
index 0000000000000000000000000000000000000000..f7891fff1347058a4b0f02127ef3e0e16ad89f68
--- /dev/null
+++ b/content/browser/renderer_host/event_with_latency_info.h
@@ -0,0 +1,39 @@
+// 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_BROWSER_RENDERER_HOST_EVENT_WITH_LATENCY_INFO_H_
+#define CONTENT_BROWSER_RENDERER_HOST_EVENT_WITH_LATENCY_INFO_H_
+
+#include <cc/debug/latency_info.h>
+
+namespace WebKit {
+class WebGestureEvent;
+class WebMouseEvent;
+class WebMouseWheelEvent;
+}
+
+namespace content {
+
+template <typename T>
+class EventWithLatencyInfo {
+ public:
+ T event;
+ cc::LatencyInfo latency;
+
+ EventWithLatencyInfo(const T& e, const cc::LatencyInfo& l)
+ : event(e), latency(l) {}
+
+ EventWithLatencyInfo() {}
+};
+
+typedef EventWithLatencyInfo<WebKit::WebGestureEvent>
+ GestureEventWithLatencyInfo;
+typedef EventWithLatencyInfo<WebKit::WebMouseWheelEvent>
+ MouseWheelEventWithLatencyInfo;
+typedef EventWithLatencyInfo<WebKit::WebMouseEvent>
+ MouseEventWithLatencyInfo;
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_EVENT_WITH_LATENCY_INFO_H_
« no previous file with comments | « no previous file | content/browser/renderer_host/gesture_event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698