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

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

Issue 171283002: Always reset touch action at the beginning of a new gesture sequence (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 if (controller) 252 if (controller)
253 controller->DiscardingGestureEvent(gesture_event.event); 253 controller->DiscardingGestureEvent(gesture_event.event);
254 return; 254 return;
255 } 255 }
256 256
257 FilterAndSendWebInputEvent(gesture_event.event, gesture_event.latency, false); 257 FilterAndSendWebInputEvent(gesture_event.event, gesture_event.latency, false);
258 } 258 }
259 259
260 void InputRouterImpl::SendTouchEvent( 260 void InputRouterImpl::SendTouchEvent(
261 const TouchEventWithLatencyInfo& touch_event) { 261 const TouchEventWithLatencyInfo& touch_event) {
262 if (WebInputEventTraits::IsNewTouchSequence(touch_event.event))
Rick Byers 2014/02/18 22:01:15 Doesn't this need to go in SendTouchEventImmediate
tdresser 2014/02/20 18:37:56 Done.
263 touch_action_filter_.StartNewTouchActionSequence();
262 touch_event_queue_->QueueEvent(touch_event); 264 touch_event_queue_->QueueEvent(touch_event);
263 } 265 }
264 266
265 // Forwards MouseEvent without passing it through 267 // Forwards MouseEvent without passing it through
266 // TouchpadTapSuppressionController. 268 // TouchpadTapSuppressionController.
267 void InputRouterImpl::SendMouseEventImmediately( 269 void InputRouterImpl::SendMouseEventImmediately(
268 const MouseEventWithLatencyInfo& mouse_event) { 270 const MouseEventWithLatencyInfo& mouse_event) {
269 // Avoid spamming the renderer with mouse move events. It is important 271 // Avoid spamming the renderer with mouse move events. It is important
270 // to note that WM_MOUSEMOVE events are anyways synthetic, but since our 272 // to note that WM_MOUSEMOVE events are anyways synthetic, but since our
271 // thread is able to rapidly consume WM_MOUSEMOVE events, we may get way 273 // thread is able to rapidly consume WM_MOUSEMOVE events, we may get way
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 break; 765 break;
764 } 766 }
765 } 767 }
766 768
767 bool InputRouterImpl::IsInOverscrollGesture() const { 769 bool InputRouterImpl::IsInOverscrollGesture() const {
768 OverscrollController* controller = client_->GetOverscrollController(); 770 OverscrollController* controller = client_->GetOverscrollController();
769 return controller && controller->overscroll_mode() != OVERSCROLL_NONE; 771 return controller && controller->overscroll_mode() != OVERSCROLL_NONE;
770 } 772 }
771 773
772 } // namespace content 774 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698