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

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

Issue 273933002: Allow exclusive touchmove slop regions in the TouchEventQueue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 6 years, 7 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 <math.h> 7 #include <math.h>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 } 174 }
175 175
176 void InputRouterImpl::SendGestureEvent( 176 void InputRouterImpl::SendGestureEvent(
177 const GestureEventWithLatencyInfo& original_gesture_event) { 177 const GestureEventWithLatencyInfo& original_gesture_event) {
178 event_stream_validator_.OnEvent(original_gesture_event.event); 178 event_stream_validator_.OnEvent(original_gesture_event.event);
179 GestureEventWithLatencyInfo gesture_event(original_gesture_event); 179 GestureEventWithLatencyInfo gesture_event(original_gesture_event);
180 180
181 if (touch_action_filter_.FilterGestureEvent(&gesture_event.event)) 181 if (touch_action_filter_.FilterGestureEvent(&gesture_event.event))
182 return; 182 return;
183 183
184 touch_event_queue_.OnGestureScrollEvent(gesture_event); 184 if (gesture_event.event.sourceDevice == WebGestureEvent::Touchscreen)
185 touch_event_queue_.OnGestureScrollEvent(gesture_event);
185 186
186 if (!IsInOverscrollGesture() && 187 if (!IsInOverscrollGesture() &&
187 !gesture_event_queue_.ShouldForward(gesture_event)) { 188 !gesture_event_queue_.ShouldForward(gesture_event)) {
188 OverscrollController* controller = client_->GetOverscrollController(); 189 OverscrollController* controller = client_->GetOverscrollController();
189 if (controller) 190 if (controller)
190 controller->DiscardingGestureEvent(gesture_event.event); 191 controller->DiscardingGestureEvent(gesture_event.event);
191 return; 192 return;
192 } 193 }
193 194
194 SendGestureEventImmediately(gesture_event); 195 SendGestureEventImmediately(gesture_event);
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 InputRouterImpl::QueuedWheelEvent::QueuedWheelEvent( 740 InputRouterImpl::QueuedWheelEvent::QueuedWheelEvent(
740 const MouseWheelEventWithLatencyInfo& event, 741 const MouseWheelEventWithLatencyInfo& event,
741 bool synthesized_from_pinch) 742 bool synthesized_from_pinch)
742 : event(event), synthesized_from_pinch(synthesized_from_pinch) { 743 : event(event), synthesized_from_pinch(synthesized_from_pinch) {
743 } 744 }
744 745
745 InputRouterImpl::QueuedWheelEvent::~QueuedWheelEvent() { 746 InputRouterImpl::QueuedWheelEvent::~QueuedWheelEvent() {
746 } 747 }
747 748
748 } // namespace content 749 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698