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

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

Issue 11188012: gesture recognizer: Remove the touch-event queue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge Created 8 years, 2 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/touch_event_queue.h
diff --git a/content/browser/renderer_host/touch_event_queue.h b/content/browser/renderer_host/touch_event_queue.h
index 2301fbd0f12441fc6d669381f4555df7e5442f1d..3a6fd605ded25b33cd400c149f7983918e852d5d 100644
--- a/content/browser/renderer_host/touch_event_queue.h
+++ b/content/browser/renderer_host/touch_event_queue.h
@@ -10,6 +10,8 @@
#include "base/basictypes.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
+class MockRenderWidgetHost;
+
namespace content {
class RenderWidgetHostImpl;
@@ -31,7 +33,26 @@ class TouchEventQueue {
// additional queued touch-events to the renderer.
void ProcessTouchAck(bool processed);
+ // Empties the queue of touch events. This may result in any number of gesture
+ // events being sent to the renderer.
+ void FlushQueue();
+
+ // Resets all internal state. This does not trigger any touch or gesture
+ // events to be sent.
+ void Reset();
+
+ // Returns whether the event-queue is empty.
+ bool empty() const WARN_UNUSED_RESULT {
+ return touch_queue_.empty();
+ }
+
private:
+ friend class ::MockRenderWidgetHost;
+
+ // Pops the touch-event from the top of the queue and sends it to the
+ // RenderWidgetHostView. This reduces the size of the queue by one.
+ void PopTouchEventToView(bool processed);
+
// The RenderWidgetHost that owns this event-queue.
RenderWidgetHostImpl* render_widget_host_;
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_win.cc ('k') | content/browser/renderer_host/touch_event_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698