| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <tuple> | 9 #include <tuple> |
| 10 | 10 |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 | 581 |
| 582 void SimulateGestureEventWithLatencyInfo(WebInputEvent::Type type, | 582 void SimulateGestureEventWithLatencyInfo(WebInputEvent::Type type, |
| 583 WebGestureDevice sourceDevice, | 583 WebGestureDevice sourceDevice, |
| 584 const ui::LatencyInfo& ui_latency) { | 584 const ui::LatencyInfo& ui_latency) { |
| 585 host_->ForwardGestureEventWithLatencyInfo( | 585 host_->ForwardGestureEventWithLatencyInfo( |
| 586 SyntheticWebGestureEventBuilder::Build(type, sourceDevice), | 586 SyntheticWebGestureEventBuilder::Build(type, sourceDevice), |
| 587 ui_latency); | 587 ui_latency); |
| 588 } | 588 } |
| 589 | 589 |
| 590 // Set the timestamp for the touch-event. | 590 // Set the timestamp for the touch-event. |
| 591 void SetTouchTimestamp(base::TimeDelta timestamp) { | 591 void SetTouchTimestamp(base::TimeTicks timestamp) { |
| 592 touch_event_.SetTimestamp(timestamp); | 592 touch_event_.SetTimestamp(timestamp); |
| 593 } | 593 } |
| 594 | 594 |
| 595 // Sends a touch event (irrespective of whether the page has a touch-event | 595 // Sends a touch event (irrespective of whether the page has a touch-event |
| 596 // handler or not). | 596 // handler or not). |
| 597 uint32_t SendTouchEvent() { | 597 uint32_t SendTouchEvent() { |
| 598 uint32_t touch_event_id = touch_event_.uniqueTouchEventId; | 598 uint32_t touch_event_id = touch_event_.uniqueTouchEventId; |
| 599 host_->ForwardTouchEventWithLatencyInfo(touch_event_, ui::LatencyInfo()); | 599 host_->ForwardTouchEventWithLatencyInfo(touch_event_, ui::LatencyInfo()); |
| 600 | 600 |
| 601 touch_event_.ResetPoints(); | 601 touch_event_.ResetPoints(); |
| (...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1673 ui::LatencyInfo()); | 1673 ui::LatencyInfo()); |
| 1674 | 1674 |
| 1675 | 1675 |
| 1676 // Tests RWHI::ForwardWheelEventWithLatencyInfo(). | 1676 // Tests RWHI::ForwardWheelEventWithLatencyInfo(). |
| 1677 SimulateWheelEventWithLatencyInfo(-5, 0, 0, true, ui::LatencyInfo()); | 1677 SimulateWheelEventWithLatencyInfo(-5, 0, 0, true, ui::LatencyInfo()); |
| 1678 | 1678 |
| 1679 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); | 1679 ASSERT_FALSE(host_->input_router()->HasPendingEvents()); |
| 1680 } | 1680 } |
| 1681 | 1681 |
| 1682 } // namespace content | 1682 } // namespace content |
| OLD | NEW |