| 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 #ifndef UI_AURA_TEST_EVENT_GENERATOR_H_ | 5 #ifndef UI_AURA_TEST_EVENT_GENERATOR_H_ |
| 6 #define UI_AURA_TEST_EVENT_GENERATOR_H_ | 6 #define UI_AURA_TEST_EVENT_GENERATOR_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 } | 207 } |
| 208 | 208 |
| 209 void PressMoveAndReleaseTouchBy(int x, int y) { | 209 void PressMoveAndReleaseTouchBy(int x, int y) { |
| 210 PressMoveAndReleaseTouchTo(current_location_ + gfx::Vector2d(x, y)); | 210 PressMoveAndReleaseTouchTo(current_location_ + gfx::Vector2d(x, y)); |
| 211 } | 211 } |
| 212 | 212 |
| 213 // Generates press, move and release events to move touch | 213 // Generates press, move and release events to move touch |
| 214 // to the center of the window. | 214 // to the center of the window. |
| 215 void PressMoveAndReleaseTouchToCenterOf(Window* window); | 215 void PressMoveAndReleaseTouchToCenterOf(Window* window); |
| 216 | 216 |
| 217 // Generates and dispatches a Win8 edge-swipe event (swipe up from bottom or |
| 218 // swipe down from top). Note that it is not possible to distinguish between |
| 219 // the two edges with this event. |
| 220 void GestureEdgeSwipe(); |
| 221 |
| 217 // Generates and dispatches touch-events required to generate a TAP gesture. | 222 // Generates and dispatches touch-events required to generate a TAP gesture. |
| 218 // Note that this can generate a number of other gesture events at the same | 223 // Note that this can generate a number of other gesture events at the same |
| 219 // time (e.g. GESTURE_BEGIN, TAP_DOWN, END). | 224 // time (e.g. GESTURE_BEGIN, TAP_DOWN, END). |
| 220 void GestureTapAt(const gfx::Point& point); | 225 void GestureTapAt(const gfx::Point& point); |
| 221 | 226 |
| 222 // Generates press and release touch-events to generate a TAP_DOWN event, but | 227 // Generates press and release touch-events to generate a TAP_DOWN event, but |
| 223 // without generating any scroll or tap events. This can also generate a few | 228 // without generating any scroll or tap events. This can also generate a few |
| 224 // other gesture events (e.g. GESTURE_BEGIN, END). | 229 // other gesture events (e.g. GESTURE_BEGIN, END). |
| 225 void GestureTapDownAndUp(const gfx::Point& point); | 230 void GestureTapDownAndUp(const gfx::Point& point); |
| 226 | 231 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 // Set to true to cause events to be posted asynchronously. | 348 // Set to true to cause events to be posted asynchronously. |
| 344 bool async_; | 349 bool async_; |
| 345 | 350 |
| 346 DISALLOW_COPY_AND_ASSIGN(EventGenerator); | 351 DISALLOW_COPY_AND_ASSIGN(EventGenerator); |
| 347 }; | 352 }; |
| 348 | 353 |
| 349 } // namespace test | 354 } // namespace test |
| 350 } // namespace aura | 355 } // namespace aura |
| 351 | 356 |
| 352 #endif // UI_AURA_TEST_EVENT_GENERATOR_H_ | 357 #endif // UI_AURA_TEST_EVENT_GENERATOR_H_ |
| OLD | NEW |