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

Side by Side Diff: content/browser/renderer_host/input/touch_event_queue.cc

Issue 183923034: Disable the touch ack timeout for touch-action:none (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final cleanup pass Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « content/browser/renderer_host/input/touch_action_filter.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/input/touch_event_queue.h" 5 #include "content/browser/renderer_host/input/touch_event_queue.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 const TouchEventWithLatencyInfo& 513 const TouchEventWithLatencyInfo&
514 TouchEventQueue::GetLatestEventForTesting() const { 514 TouchEventQueue::GetLatestEventForTesting() const {
515 return touch_queue_.back()->coalesced_event(); 515 return touch_queue_.back()->coalesced_event();
516 } 516 }
517 517
518 void TouchEventQueue::FlushQueue() { 518 void TouchEventQueue::FlushQueue() {
519 DCHECK(!dispatching_touch_ack_); 519 DCHECK(!dispatching_touch_ack_);
520 DCHECK(!dispatching_touch_); 520 DCHECK(!dispatching_touch_);
521 if (touch_filtering_state_ != DROP_ALL_TOUCHES) 521 if (touch_filtering_state_ != DROP_ALL_TOUCHES)
522 touch_filtering_state_ = DROP_TOUCHES_IN_SEQUENCE; 522 touch_filtering_state_ = DROP_TOUCHES_IN_SEQUENCE;
523 while (!touch_queue_.empty()) 523 while (!touch_queue_.empty()) {
524 PopTouchEventToClient(INPUT_EVENT_ACK_STATE_NOT_CONSUMED, LatencyInfo()); 524 PopTouchEventToClient(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS,
525 LatencyInfo());
526 }
525 } 527 }
526 528
527 void TouchEventQueue::PopTouchEventToClient( 529 void TouchEventQueue::PopTouchEventToClient(
528 InputEventAckState ack_result, 530 InputEventAckState ack_result,
529 const LatencyInfo& renderer_latency_info) { 531 const LatencyInfo& renderer_latency_info) {
530 DCHECK(!dispatching_touch_ack_); 532 DCHECK(!dispatching_touch_ack_);
531 if (touch_queue_.empty()) 533 if (touch_queue_.empty())
532 return; 534 return;
533 scoped_ptr<CoalescedWebTouchEvent> acked_event(touch_queue_.front()); 535 scoped_ptr<CoalescedWebTouchEvent> acked_event(touch_queue_.front());
534 touch_queue_.pop_front(); 536 touch_queue_.pop_front();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 } else if (event.type == WebInputEvent::TouchStart) { 611 } else if (event.type == WebInputEvent::TouchStart) {
610 for (unsigned i = 0; i < event.touchesLength; ++i) { 612 for (unsigned i = 0; i < event.touchesLength; ++i) {
611 const WebTouchPoint& point = event.touches[i]; 613 const WebTouchPoint& point = event.touches[i];
612 if (point.state == WebTouchPoint::StatePressed) 614 if (point.state == WebTouchPoint::StatePressed)
613 touch_ack_states_[point.id] = ack_result; 615 touch_ack_states_[point.id] = ack_result;
614 } 616 }
615 } 617 }
616 } 618 }
617 619
618 } // namespace content 620 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/input/touch_action_filter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698