OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/events/gestures/test/eager_gesture_recognition_test_base.h" |
| 6 |
| 7 #include "ui/events/gestures/gesture_event_queue.h" |
| 8 |
| 9 namespace ui { |
| 10 namespace test { |
| 11 |
| 12 EagerGestureRecognitionTestBase::EagerGestureRecognitionTestBase() {} |
| 13 |
| 14 EagerGestureRecognitionTestBase::~EagerGestureRecognitionTestBase() {} |
| 15 |
| 16 const TouchEvent EagerGestureRecognitionTestBase::Press(int id) { |
| 17 return TouchEvent(ET_TOUCH_PRESSED, gfx::Point(0, 0), id, |
| 18 base::TimeDelta::FromMilliseconds(simulated_now_)); |
| 19 } |
| 20 |
| 21 const TouchEvent EagerGestureRecognitionTestBase::Move(int id) { |
| 22 return TouchEvent(ET_TOUCH_MOVED, gfx::Point(1000, 1000), id, |
| 23 base::TimeDelta::FromMilliseconds(simulated_now_)); |
| 24 } |
| 25 |
| 26 const TouchEvent EagerGestureRecognitionTestBase::Release(int id) { |
| 27 simulated_now_ += 50; |
| 28 return TouchEvent(ET_TOUCH_RELEASED, gfx::Point(0, 0), id, |
| 29 base::TimeDelta::FromMilliseconds(simulated_now_)); |
| 30 } |
| 31 |
| 32 GestureEvent* EagerGestureRecognitionTestBase::Gesture( |
| 33 ui::EventType eventType) { |
| 34 return new GestureEvent(eventType, 0, 0, 0, base::TimeDelta(), |
| 35 GestureEventDetails(eventType, 0, 0), |
| 36 0); |
| 37 } |
| 38 |
| 39 } // namespace test |
| 40 } // namespace ui |
OLD | NEW |