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 <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 181 } else if (!touch_scroll_started_sent_ && | 181 } else if (!touch_scroll_started_sent_ && |
| 182 gesture_event.event.GetType() == | 182 gesture_event.event.GetType() == |
| 183 blink::WebInputEvent::kGestureScrollUpdate) { | 183 blink::WebInputEvent::kGestureScrollUpdate) { |
| 184 // A touch scroll hasn't really started until the first | 184 // A touch scroll hasn't really started until the first |
| 185 // GestureScrollUpdate event. Eg. if the page consumes all touchmoves | 185 // GestureScrollUpdate event. Eg. if the page consumes all touchmoves |
| 186 // then no scrolling really ever occurs (even though we still send | 186 // then no scrolling really ever occurs (even though we still send |
| 187 // GestureScrollBegin). | 187 // GestureScrollBegin). |
| 188 touch_scroll_started_sent_ = true; | 188 touch_scroll_started_sent_ = true; |
| 189 touch_event_queue_->PrependTouchScrollNotification(); | 189 touch_event_queue_->PrependTouchScrollNotification(); |
| 190 } | 190 } |
| 191 gesture_event.event.source_touch_event_dispatch_type = | |
| 192 touch_event_queue_->SendTouchEventsAsync() | |
|
dtapuska
2017/05/10 14:49:00
I don't think we really should query the state her
chongz
2017/05/24 13:47:09
Done.
| |
| 193 ? WebInputEvent::kEventNonBlocking | |
| 194 : WebInputEvent::kBlocking; | |
| 191 touch_event_queue_->OnGestureScrollEvent(gesture_event); | 195 touch_event_queue_->OnGestureScrollEvent(gesture_event); |
| 192 } | 196 } |
| 193 | 197 |
| 194 gesture_event_queue_.QueueEvent(gesture_event); | 198 gesture_event_queue_.QueueEvent(gesture_event); |
| 195 } | 199 } |
| 196 | 200 |
| 197 void InputRouterImpl::SendTouchEvent( | 201 void InputRouterImpl::SendTouchEvent( |
| 198 const TouchEventWithLatencyInfo& touch_event) { | 202 const TouchEventWithLatencyInfo& touch_event) { |
| 199 TouchEventWithLatencyInfo updatd_touch_event = touch_event; | 203 TouchEventWithLatencyInfo updatd_touch_event = touch_event; |
| 200 SetMovementXYForTouchPoints(&updatd_touch_event.event); | 204 SetMovementXYForTouchPoints(&updatd_touch_event.event); |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 669 DCHECK(global_touch_position_.find(touch_point->id) == | 673 DCHECK(global_touch_position_.find(touch_point->id) == |
| 670 global_touch_position_.end()); | 674 global_touch_position_.end()); |
| 671 global_touch_position_[touch_point->id] = gfx::Point( | 675 global_touch_position_[touch_point->id] = gfx::Point( |
| 672 touch_point->screen_position.x, touch_point->screen_position.y); | 676 touch_point->screen_position.x, touch_point->screen_position.y); |
| 673 } | 677 } |
| 674 } | 678 } |
| 675 } | 679 } |
| 676 } | 680 } |
| 677 | 681 |
| 678 } // namespace content | 682 } // namespace content |
| OLD | NEW |