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

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: nuke ifdefs 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..70e67f242b597836f0ec85c5b3b929e8ea79dc1f 100644
--- a/content/browser/renderer_host/render_widget_host.h
+++ b/content/browser/renderer_host/render_widget_host.h
@@ -261,9 +261,7 @@ class RenderWidgetHost : public IPC::Channel::Listener,
virtual void OnMouseActivate();
void ForwardWheelEvent(const WebKit::WebMouseWheelEvent& wheel_event);
virtual void ForwardKeyboardEvent(const NativeWebKeyboardEvent& key_event);
-#if defined(TOUCH_UI)
virtual void ForwardTouchEvent(const WebKit::WebTouchEvent& touch_event);
-#endif
// Update the text direction of the focused input element and notify it to a
@@ -590,6 +588,19 @@ class RenderWidgetHost : public IPC::Channel::Listener,
// would be queued) results in very slow scrolling.
WheelEventQueue coalesced_mouse_wheel_events_;
+ // 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_;
+
// The time when an input event was sent to the RenderWidget.
base::TimeTicks input_event_start_time_;
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698