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

Unified Diff: content/browser/renderer_host/input/touch_event_queue.cc

Issue 67383002: Initial browser-side implementation for touch-action (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/input/touch_event_queue.cc
diff --git a/content/browser/renderer_host/input/touch_event_queue.cc b/content/browser/renderer_host/input/touch_event_queue.cc
index 33717901cd1cc395dbeab6e67565624e96b98d6b..e08e9fab30b72bd2098179715a2e588810b0374f 100644
--- a/content/browser/renderer_host/input/touch_event_queue.cc
+++ b/content/browser/renderer_host/input/touch_event_queue.cc
@@ -201,6 +201,25 @@ void TouchEventQueue::FlushQueue() {
ui::LatencyInfo());
}
+bool TouchEventQueue::IsTouchStartPendingAck(int touch_id)
+{
+ if (touch_queue_.empty())
+ return false;
+
+ const WebKit::WebTouchEvent& event =
+ touch_queue_.front()->coalesced_event().event;
+ if (event.type == WebKit::WebInputEvent::TouchStart) {
+ for (unsigned i = 0; i < event.touchesLength; ++i) {
+ const WebKit::WebTouchPoint& point = event.touches[i];
+ if (point.state == WebKit::WebTouchPoint::StatePressed &&
+ point.id == touch_id)
+ return true;
+ }
+ }
+
+ return false;
+}
+
size_t TouchEventQueue::GetQueueSize() const {
return touch_queue_.size();
}

Powered by Google App Engine
This is Rietveld 408576698