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

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

Issue 7044096: Throttle the touch move events sent to the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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/browser/renderer_host/render_widget_host.h
diff --git a/content/browser/renderer_host/render_widget_host.h b/content/browser/renderer_host/render_widget_host.h
index 49b7129bb52557c318efc86cf0283f07e378217c..6fc6ef559ac88121dd8cdc0aedd4d1707053739d 100644
--- a/content/browser/renderer_host/render_widget_host.h
+++ b/content/browser/renderer_host/render_widget_host.h
@@ -590,6 +590,21 @@ class RenderWidgetHost : public IPC::Channel::Listener,
// would be queued) results in very slow scrolling.
WheelEventQueue coalesced_mouse_wheel_events_;
+#if defined(TOUCH_UI)
+ // True if a touch move event was sent to the renderer view and we are waiting
+ // for a corresponding ACK message.
+ bool touch_move_pending_;
+
+ // If a touch move event comes in while we are waiting for an ACK for a
+ // previously sent touch move event, it will be stored here. A touch event
+ // stores the location of the moved point, instead of the amount that it
+ // moved. So it is not necessary to coalesce the move events (as is done for
+ // mouse wheel events). Storing the most recent event for dispatch is
+ // sufficient.
+ WebKit::WebTouchEvent queued_touch_event_;
+ bool touch_event_is_queued_;
+#endif
+
// The time when an input event was sent to the RenderWidget.
base::TimeTicks input_event_start_time_;

Powered by Google App Engine
This is Rietveld 408576698