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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 279 return; | 279 return; |
| 280 } | 280 } |
| 281 mouse_move_pending_ = true; | 281 mouse_move_pending_ = true; |
| 282 } | 282 } |
| 283 | 283 |
| 284 FilterAndSendWebInputEvent(mouse_event.event, mouse_event.latency, false); | 284 FilterAndSendWebInputEvent(mouse_event.event, mouse_event.latency, false); |
| 285 } | 285 } |
| 286 | 286 |
| 287 void InputRouterImpl::SendTouchEventImmediately( | 287 void InputRouterImpl::SendTouchEventImmediately( |
| 288 const TouchEventWithLatencyInfo& touch_event) { | 288 const TouchEventWithLatencyInfo& touch_event) { |
| 289 if (WebInputEventTraits::IsNewTouchSequence(touch_event.event)) | |
|
jdduke (slow)
2014/02/21 15:45:33
Hmm, what if the touch handler is removed during a
jdduke (slow)
2014/02/21 15:50:10
Hmm, we should probably have |OnHasTouchEventHandl
tdresser
2014/02/21 19:14:03
In theory OnHasTouchHandlers should be completely
Rick Byers
2014/02/21 19:52:13
I think Jared is right here - good catch! The pro
| |
| 290 touch_action_filter_.OnStartNewTouchSequence(); | |
| 291 | |
| 289 FilterAndSendWebInputEvent(touch_event.event, touch_event.latency, false); | 292 FilterAndSendWebInputEvent(touch_event.event, touch_event.latency, false); |
| 290 } | 293 } |
| 291 | 294 |
| 292 void InputRouterImpl::SendGestureEventImmediately( | 295 void InputRouterImpl::SendGestureEventImmediately( |
| 293 const GestureEventWithLatencyInfo& gesture_event) { | 296 const GestureEventWithLatencyInfo& gesture_event) { |
| 294 FilterAndSendWebInputEvent(gesture_event.event, gesture_event.latency, false); | 297 FilterAndSendWebInputEvent(gesture_event.event, gesture_event.latency, false); |
| 295 } | 298 } |
| 296 | 299 |
| 297 const NativeWebKeyboardEvent* InputRouterImpl::GetLastKeyboardEvent() const { | 300 const NativeWebKeyboardEvent* InputRouterImpl::GetLastKeyboardEvent() const { |
| 298 if (key_queue_.empty()) | 301 if (key_queue_.empty()) |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 763 break; | 766 break; |
| 764 } | 767 } |
| 765 } | 768 } |
| 766 | 769 |
| 767 bool InputRouterImpl::IsInOverscrollGesture() const { | 770 bool InputRouterImpl::IsInOverscrollGesture() const { |
| 768 OverscrollController* controller = client_->GetOverscrollController(); | 771 OverscrollController* controller = client_->GetOverscrollController(); |
| 769 return controller && controller->overscroll_mode() != OVERSCROLL_NONE; | 772 return controller && controller->overscroll_mode() != OVERSCROLL_NONE; |
| 770 } | 773 } |
| 771 | 774 |
| 772 } // namespace content | 775 } // namespace content |
| OLD | NEW |