| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |