| 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/synthetic_touchscreen_pinch_gestur
e.h" | 5 #include "content/browser/renderer_host/input/synthetic_touchscreen_pinch_gestur
e.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 | 10 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "ui/events/latency_info.h" | 12 #include "ui/latency/latency_info.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 SyntheticTouchscreenPinchGesture::SyntheticTouchscreenPinchGesture( | 16 SyntheticTouchscreenPinchGesture::SyntheticTouchscreenPinchGesture( |
| 17 const SyntheticPinchGestureParams& params) | 17 const SyntheticPinchGestureParams& params) |
| 18 : params_(params), | 18 : params_(params), |
| 19 start_y_0_(0.0f), | 19 start_y_0_(0.0f), |
| 20 start_y_1_(0.0f), | 20 start_y_1_(0.0f), |
| 21 max_pointer_delta_0_(0.0f), | 21 max_pointer_delta_0_(0.0f), |
| 22 gesture_source_type_(SyntheticGestureParams::DEFAULT_INPUT), | 22 gesture_source_type_(SyntheticGestureParams::DEFAULT_INPUT), |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 const base::TimeTicks& timestamp) const { | 163 const base::TimeTicks& timestamp) const { |
| 164 return std::min(timestamp, stop_time_); | 164 return std::min(timestamp, stop_time_); |
| 165 } | 165 } |
| 166 | 166 |
| 167 bool SyntheticTouchscreenPinchGesture::HasReachedTarget( | 167 bool SyntheticTouchscreenPinchGesture::HasReachedTarget( |
| 168 const base::TimeTicks& timestamp) const { | 168 const base::TimeTicks& timestamp) const { |
| 169 return timestamp >= stop_time_; | 169 return timestamp >= stop_time_; |
| 170 } | 170 } |
| 171 | 171 |
| 172 } // namespace content | 172 } // namespace content |
| OLD | NEW |