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

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

Issue 569793003: Remove unnecessary DCHECK in TouchEventQueue handler notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | content/browser/renderer_host/input/touch_event_queue_unittest.cc » ('j') | 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/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "content/browser/renderer_host/input/timeout_monitor.h" 10 #include "content/browser/renderer_host/input/timeout_monitor.h"
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 } 619 }
620 620
621 void TouchEventQueue::OnHasTouchEventHandlers(bool has_handlers) { 621 void TouchEventQueue::OnHasTouchEventHandlers(bool has_handlers) {
622 DCHECK(!dispatching_touch_ack_); 622 DCHECK(!dispatching_touch_ack_);
623 DCHECK(!dispatching_touch_); 623 DCHECK(!dispatching_touch_);
624 624
625 if (has_handlers) { 625 if (has_handlers) {
626 if (touch_filtering_state_ == DROP_ALL_TOUCHES) { 626 if (touch_filtering_state_ == DROP_ALL_TOUCHES) {
627 // If no touch handler was previously registered, ensure that we don't 627 // If no touch handler was previously registered, ensure that we don't
628 // send a partial touch sequence to the renderer. 628 // send a partial touch sequence to the renderer.
629 DCHECK(touch_queue_.empty());
630 touch_filtering_state_ = DROP_TOUCHES_IN_SEQUENCE; 629 touch_filtering_state_ = DROP_TOUCHES_IN_SEQUENCE;
631 } 630 }
632 } else { 631 } else {
633 // TODO(jdduke): Synthesize a TouchCancel if necessary to update Blink touch 632 // TODO(jdduke): Synthesize a TouchCancel if necessary to update Blink touch
634 // state tracking and/or touch-action filtering (e.g., if the touch handler 633 // state tracking and/or touch-action filtering (e.g., if the touch handler
635 // was removed mid-sequence), crbug.com/375940. 634 // was removed mid-sequence), crbug.com/375940.
636 touch_filtering_state_ = DROP_ALL_TOUCHES; 635 touch_filtering_state_ = DROP_ALL_TOUCHES;
637 pending_async_touchmove_.reset(); 636 pending_async_touchmove_.reset();
638 if (timeout_handler_) 637 if (timeout_handler_)
639 timeout_handler_->Reset(); 638 timeout_handler_->Reset();
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 iter != end; 815 iter != end;
817 ++iter) { 816 ++iter) {
818 if (iter->second != ack_state) 817 if (iter->second != ack_state)
819 return false; 818 return false;
820 } 819 }
821 820
822 return true; 821 return true;
823 } 822 }
824 823
825 } // namespace content 824 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/input/touch_event_queue_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698