| 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 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 const GestureEventWithLatencyInfo& original_gesture_event) { | 151 const GestureEventWithLatencyInfo& original_gesture_event) { |
| 152 input_stream_validator_.Validate(original_gesture_event.event); | 152 input_stream_validator_.Validate(original_gesture_event.event); |
| 153 | 153 |
| 154 GestureEventWithLatencyInfo gesture_event(original_gesture_event); | 154 GestureEventWithLatencyInfo gesture_event(original_gesture_event); |
| 155 | 155 |
| 156 if (touch_action_filter_.FilterGestureEvent(&gesture_event.event)) | 156 if (touch_action_filter_.FilterGestureEvent(&gesture_event.event)) |
| 157 return; | 157 return; |
| 158 | 158 |
| 159 wheel_event_queue_.OnGestureScrollEvent(gesture_event); | 159 wheel_event_queue_.OnGestureScrollEvent(gesture_event); |
| 160 | 160 |
| 161 if (gesture_event.event.sourceDevice == blink::WebGestureDeviceTouchscreen) | 161 if (gesture_event.event.sourceDevice == blink::WebGestureDeviceTouchscreen) { |
| 162 if (gesture_event.event.type == blink::WebInputEvent::GestureScrollBegin) |
| 163 touch_event_queue_.PrependTouchScrollNotification(); |
| 162 touch_event_queue_.OnGestureScrollEvent(gesture_event); | 164 touch_event_queue_.OnGestureScrollEvent(gesture_event); |
| 165 } |
| 163 | 166 |
| 164 gesture_event_queue_.QueueEvent(gesture_event); | 167 gesture_event_queue_.QueueEvent(gesture_event); |
| 165 } | 168 } |
| 166 | 169 |
| 167 void InputRouterImpl::SendTouchEvent( | 170 void InputRouterImpl::SendTouchEvent( |
| 168 const TouchEventWithLatencyInfo& touch_event) { | 171 const TouchEventWithLatencyInfo& touch_event) { |
| 169 input_stream_validator_.Validate(touch_event.event); | 172 input_stream_validator_.Validate(touch_event.event); |
| 170 touch_event_queue_.QueueEvent(touch_event); | 173 touch_event_queue_.QueueEvent(touch_event); |
| 171 } | 174 } |
| 172 | 175 |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 | 641 |
| 639 flush_requested_ = false; | 642 flush_requested_ = false; |
| 640 client_->DidFlush(); | 643 client_->DidFlush(); |
| 641 } | 644 } |
| 642 | 645 |
| 643 void InputRouterImpl::SetFrameTreeNodeId(int frameTreeNodeId) { | 646 void InputRouterImpl::SetFrameTreeNodeId(int frameTreeNodeId) { |
| 644 frame_tree_node_id_ = frameTreeNodeId; | 647 frame_tree_node_id_ = frameTreeNodeId; |
| 645 } | 648 } |
| 646 | 649 |
| 647 } // namespace content | 650 } // namespace content |
| OLD | NEW |