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

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

Issue 130993003: Prevent partial touch sequences from reaching the renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 11 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
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/input_router_impl.h" 5 #include "content/browser/renderer_host/input/input_router_impl.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/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 void InputRouterImpl::OnSelectRangeAck() { 494 void InputRouterImpl::OnSelectRangeAck() {
495 select_range_pending_ = false; 495 select_range_pending_ = false;
496 if (next_selection_range_) 496 if (next_selection_range_)
497 SendSelectRange(next_selection_range_.Pass()); 497 SendSelectRange(next_selection_range_.Pass());
498 } 498 }
499 499
500 void InputRouterImpl::OnHasTouchEventHandlers(bool has_handlers) { 500 void InputRouterImpl::OnHasTouchEventHandlers(bool has_handlers) {
501 TRACE_EVENT1("input", "InputRouterImpl::OnHasTouchEventHandlers", 501 TRACE_EVENT1("input", "InputRouterImpl::OnHasTouchEventHandlers",
502 "has_handlers", has_handlers); 502 "has_handlers", has_handlers);
503 503
504 if (has_handlers == touch_event_queue_->has_handlers())
505 return;
506 touch_event_queue_->OnHasTouchEventHandlers(has_handlers); 504 touch_event_queue_->OnHasTouchEventHandlers(has_handlers);
507 client_->OnHasTouchEventHandlers(has_handlers); 505 client_->OnHasTouchEventHandlers(has_handlers);
508 } 506 }
509 507
510 void InputRouterImpl::OnSetTouchAction( 508 void InputRouterImpl::OnSetTouchAction(
511 content::TouchAction touch_action) { 509 content::TouchAction touch_action) {
512 // Synthetic touchstart events should get filtered out in RenderWidget. 510 // Synthetic touchstart events should get filtered out in RenderWidget.
513 DCHECK(touch_event_queue_->IsPendingAckTouchStart()); 511 DCHECK(touch_event_queue_->IsPendingAckTouchStart());
514 512
515 touch_action_filter_.OnSetTouchAction(touch_action); 513 touch_action_filter_.OnSetTouchAction(touch_action);
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 break; 719 break;
722 } 720 }
723 } 721 }
724 722
725 bool InputRouterImpl::IsInOverscrollGesture() const { 723 bool InputRouterImpl::IsInOverscrollGesture() const {
726 OverscrollController* controller = client_->GetOverscrollController(); 724 OverscrollController* controller = client_->GetOverscrollController();
727 return controller && controller->overscroll_mode() != OVERSCROLL_NONE; 725 return controller && controller->overscroll_mode() != OVERSCROLL_NONE;
728 } 726 }
729 727
730 } // namespace content 728 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698