Chromium Code Reviews| 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 "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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |