OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // MSVC++ requires this to be set before any other includes to get M_PI. | 5 // MSVC++ requires this to be set before any other includes to get M_PI. |
6 #define _USE_MATH_DEFINES | 6 #define _USE_MATH_DEFINES |
7 | 7 |
8 #include "ui/events/blink/blink_event_util.h" | 8 #include "ui/events/blink/blink_event_util.h" |
9 | 9 |
| 10 #include <algorithm> |
10 #include <cmath> | 11 #include <cmath> |
11 | 12 |
12 #include "base/time/time.h" | 13 #include "base/time/time.h" |
13 #include "third_party/WebKit/public/web/WebInputEvent.h" | 14 #include "third_party/WebKit/public/web/WebInputEvent.h" |
14 #include "ui/events/event_constants.h" | 15 #include "ui/events/event_constants.h" |
15 #include "ui/events/gesture_detection/gesture_event_data.h" | 16 #include "ui/events/gesture_detection/gesture_event_data.h" |
16 #include "ui/events/gesture_detection/motion_event.h" | 17 #include "ui/events/gesture_detection/motion_event.h" |
17 #include "ui/events/gesture_event_details.h" | 18 #include "ui/events/gesture_event_details.h" |
18 #include "ui/gfx/geometry/safe_integer_conversions.h" | 19 #include "ui/gfx/geometry/safe_integer_conversions.h" |
19 | 20 |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 } | 358 } |
358 | 359 |
359 WebGestureEvent CreateWebGestureEventFromGestureEventData( | 360 WebGestureEvent CreateWebGestureEventFromGestureEventData( |
360 const GestureEventData& data) { | 361 const GestureEventData& data) { |
361 return CreateWebGestureEvent(data.details, data.time - base::TimeTicks(), | 362 return CreateWebGestureEvent(data.details, data.time - base::TimeTicks(), |
362 gfx::PointF(data.x, data.y), | 363 gfx::PointF(data.x, data.y), |
363 gfx::PointF(data.raw_x, data.raw_y), data.flags); | 364 gfx::PointF(data.raw_x, data.raw_y), data.flags); |
364 } | 365 } |
365 | 366 |
366 } // namespace ui | 367 } // namespace ui |
OLD | NEW |