Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(827)

Side by Side Diff: ui/events/gestures/test/eager_gesture_recognition_test_base.cc

Issue 101933004: Eager Gesture Recognizer (WIP) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Starting work on Android. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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
OLDNEW
« no previous file with comments | « ui/events/gestures/test/eager_gesture_recognition_test_base.h ('k') | ui/events/gestures/touch_point_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698