OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/touch_emulator.h" | 5 #include "content/browser/renderer_host/input/touch_emulator.h" |
6 | 6 |
7 #include "content/browser/renderer_host/input/motion_event_web.h" | 7 #include "content/browser/renderer_host/input/motion_event_web.h" |
8 #include "content/browser/renderer_host/input/web_input_event_util.h" | 8 #include "content/browser/renderer_host/input/web_input_event_util.h" |
9 #include "content/common/input/web_touch_event_traits.h" | 9 #include "content/common/input/web_touch_event_traits.h" |
10 #include "content/grit/content_resources.h" | 10 #include "content/grit/content_resources.h" |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 touch_event_.modifiers = mouse_event.modifiers; | 419 touch_event_.modifiers = mouse_event.modifiers; |
420 WebTouchEventTraits::ResetTypeAndTouchStates( | 420 WebTouchEventTraits::ResetTypeAndTouchStates( |
421 eventType, mouse_event.timeStampSeconds, &touch_event_); | 421 eventType, mouse_event.timeStampSeconds, &touch_event_); |
422 | 422 |
423 WebTouchPoint& point = touch_event_.touches[0]; | 423 WebTouchPoint& point = touch_event_.touches[0]; |
424 point.id = 0; | 424 point.id = 0; |
425 point.radiusX = 0.5f * cursor_size_.width(); | 425 point.radiusX = 0.5f * cursor_size_.width(); |
426 point.radiusY = 0.5f * cursor_size_.height(); | 426 point.radiusY = 0.5f * cursor_size_.height(); |
427 point.force = 1.f; | 427 point.force = 1.f; |
428 point.rotationAngle = 0.f; | 428 point.rotationAngle = 0.f; |
| 429 point.tilt = 0.f; |
429 point.position.x = mouse_event.x; | 430 point.position.x = mouse_event.x; |
430 point.screenPosition.x = mouse_event.globalX; | 431 point.screenPosition.x = mouse_event.globalX; |
431 point.position.y = mouse_event.y; | 432 point.position.y = mouse_event.y; |
432 point.screenPosition.y = mouse_event.globalY; | 433 point.screenPosition.y = mouse_event.globalY; |
433 | 434 |
434 return true; | 435 return true; |
435 } | 436 } |
436 | 437 |
437 bool TouchEmulator::InPinchGestureMode() const { | 438 bool TouchEmulator::InPinchGestureMode() const { |
438 return shift_pressed_; | 439 return shift_pressed_; |
439 } | 440 } |
440 | 441 |
441 } // namespace content | 442 } // namespace content |
OLD | NEW |