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 <cmath> | 10 #include <cmath> |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 if (flags & EF_LEFT_MOUSE_BUTTON) | 206 if (flags & EF_LEFT_MOUSE_BUTTON) |
207 modifiers |= blink::WebInputEvent::LeftButtonDown; | 207 modifiers |= blink::WebInputEvent::LeftButtonDown; |
208 if (flags & EF_MIDDLE_MOUSE_BUTTON) | 208 if (flags & EF_MIDDLE_MOUSE_BUTTON) |
209 modifiers |= blink::WebInputEvent::MiddleButtonDown; | 209 modifiers |= blink::WebInputEvent::MiddleButtonDown; |
210 if (flags & EF_RIGHT_MOUSE_BUTTON) | 210 if (flags & EF_RIGHT_MOUSE_BUTTON) |
211 modifiers |= blink::WebInputEvent::RightButtonDown; | 211 modifiers |= blink::WebInputEvent::RightButtonDown; |
212 if (flags & EF_CAPS_LOCK_DOWN) | 212 if (flags & EF_CAPS_LOCK_DOWN) |
213 modifiers |= blink::WebInputEvent::CapsLockOn; | 213 modifiers |= blink::WebInputEvent::CapsLockOn; |
214 if (flags & EF_IS_REPEAT) | 214 if (flags & EF_IS_REPEAT) |
215 modifiers |= blink::WebInputEvent::IsAutoRepeat; | 215 modifiers |= blink::WebInputEvent::IsAutoRepeat; |
| 216 if (flags & ui::EF_TOUCH_ACCESSIBILITY) |
| 217 modifiers |= blink::WebInputEvent::IsTouchAccessibility; |
216 | 218 |
217 return modifiers; | 219 return modifiers; |
218 } | 220 } |
219 | 221 |
220 WebGestureEvent CreateWebGestureEvent(const GestureEventDetails& details, | 222 WebGestureEvent CreateWebGestureEvent(const GestureEventDetails& details, |
221 base::TimeDelta timestamp, | 223 base::TimeDelta timestamp, |
222 const gfx::PointF& location, | 224 const gfx::PointF& location, |
223 const gfx::PointF& raw_location, | 225 const gfx::PointF& raw_location, |
224 int flags) { | 226 int flags) { |
225 WebGestureEvent gesture; | 227 WebGestureEvent gesture; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 } | 332 } |
331 | 333 |
332 WebGestureEvent CreateWebGestureEventFromGestureEventData( | 334 WebGestureEvent CreateWebGestureEventFromGestureEventData( |
333 const GestureEventData& data) { | 335 const GestureEventData& data) { |
334 return CreateWebGestureEvent(data.details, data.time - base::TimeTicks(), | 336 return CreateWebGestureEvent(data.details, data.time - base::TimeTicks(), |
335 gfx::PointF(data.x, data.y), | 337 gfx::PointF(data.x, data.y), |
336 gfx::PointF(data.raw_x, data.raw_y), data.flags); | 338 gfx::PointF(data.raw_x, data.raw_y), data.flags); |
337 } | 339 } |
338 | 340 |
339 } // namespace ui | 341 } // namespace ui |
OLD | NEW |