| 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_gesture.h" | 5 #include "content/browser/renderer_host/input/synthetic_gesture.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" | 8 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" |
| 9 #include "content/browser/renderer_host/input/synthetic_pinch_gesture.h" | 9 #include "content/browser/renderer_host/input/synthetic_pinch_gesture.h" |
| 10 #include "content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.h" | 10 #include "content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 return CreateGesture<SyntheticPinchGesture, | 36 return CreateGesture<SyntheticPinchGesture, |
| 37 SyntheticPinchGestureParams>(gesture_params); | 37 SyntheticPinchGestureParams>(gesture_params); |
| 38 case SyntheticGestureParams::TAP_GESTURE: | 38 case SyntheticGestureParams::TAP_GESTURE: |
| 39 return CreateGesture<SyntheticTapGesture, | 39 return CreateGesture<SyntheticTapGesture, |
| 40 SyntheticTapGestureParams>(gesture_params); | 40 SyntheticTapGestureParams>(gesture_params); |
| 41 } | 41 } |
| 42 NOTREACHED() << "Invalid synthetic gesture type"; | 42 NOTREACHED() << "Invalid synthetic gesture type"; |
| 43 return scoped_ptr<SyntheticGesture>(); | 43 return scoped_ptr<SyntheticGesture>(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 // static |
| 47 double SyntheticGesture::ConvertTimestampToSeconds( |
| 48 const base::TimeTicks& timestamp) { |
| 49 return (timestamp - base::TimeTicks()).InSecondsF(); |
| 50 } |
| 51 |
| 46 } // namespace content | 52 } // namespace content |
| OLD | NEW |