| 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 "ui/events/blink/input_handler_proxy.h" | 5 #include "ui/events/blink/input_handler_proxy.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 scroll_state_data.delta_y = -event.data.scrollUpdate.deltaY; | 150 scroll_state_data.delta_y = -event.data.scrollUpdate.deltaY; |
| 151 scroll_state_data.velocity_x = event.data.scrollUpdate.velocityX; | 151 scroll_state_data.velocity_x = event.data.scrollUpdate.velocityX; |
| 152 scroll_state_data.velocity_y = event.data.scrollUpdate.velocityY; | 152 scroll_state_data.velocity_y = event.data.scrollUpdate.velocityY; |
| 153 scroll_state_data.is_in_inertial_phase = | 153 scroll_state_data.is_in_inertial_phase = |
| 154 event.data.scrollUpdate.inertialPhase == | 154 event.data.scrollUpdate.inertialPhase == |
| 155 WebGestureEvent::MomentumPhase; | 155 WebGestureEvent::MomentumPhase; |
| 156 break; | 156 break; |
| 157 case WebInputEvent::GestureScrollEnd: | 157 case WebInputEvent::GestureScrollEnd: |
| 158 case WebInputEvent::GestureFlingCancel: | 158 case WebInputEvent::GestureFlingCancel: |
| 159 scroll_state_data.is_ending = true; | 159 scroll_state_data.is_ending = true; |
| 160 scroll_state_data.fling_might_happen_next = |
| 161 event.data.scrollEnd.flingMightHappenNext; |
| 160 break; | 162 break; |
| 161 default: | 163 default: |
| 162 NOTREACHED(); | 164 NOTREACHED(); |
| 163 break; | 165 break; |
| 164 } | 166 } |
| 165 return cc::ScrollState(scroll_state_data); | 167 return cc::ScrollState(scroll_state_data); |
| 166 } | 168 } |
| 167 | 169 |
| 168 void ReportInputEventLatencyUma(const WebInputEvent& event, | 170 void ReportInputEventLatencyUma(const WebInputEvent& event, |
| 169 const ui::LatencyInfo& latency_info) { | 171 const ui::LatencyInfo& latency_info) { |
| (...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1391 // is made asynchronously, to minimize divergence between main thread and | 1393 // is made asynchronously, to minimize divergence between main thread and |
| 1392 // impl thread event handling paths. | 1394 // impl thread event handling paths. |
| 1393 base::ThreadTaskRunnerHandle::Get()->PostTask( | 1395 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 1394 FROM_HERE, | 1396 FROM_HERE, |
| 1395 base::Bind(&InputScrollElasticityController::ObserveGestureEventAndResult, | 1397 base::Bind(&InputScrollElasticityController::ObserveGestureEventAndResult, |
| 1396 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, | 1398 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, |
| 1397 scroll_result)); | 1399 scroll_result)); |
| 1398 } | 1400 } |
| 1399 | 1401 |
| 1400 } // namespace ui | 1402 } // namespace ui |
| OLD | NEW |