| 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 #if defined(OS_WIN) |
| 218 void GestureEdgeSwipe(); |
| 219 #endif |
| 220 |
| 217 // Generates and dispatches touch-events required to generate a TAP gesture. | 221 // 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 | 222 // Note that this can generate a number of other gesture events at the same |
| 219 // time (e.g. GESTURE_BEGIN, TAP_DOWN, END). | 223 // time (e.g. GESTURE_BEGIN, TAP_DOWN, END). |
| 220 void GestureTapAt(const gfx::Point& point); | 224 void GestureTapAt(const gfx::Point& point); |
| 221 | 225 |
| 222 // Generates press and release touch-events to generate a TAP_DOWN event, but | 226 // 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 | 227 // without generating any scroll or tap events. This can also generate a few |
| 224 // other gesture events (e.g. GESTURE_BEGIN, END). | 228 // other gesture events (e.g. GESTURE_BEGIN, END). |
| 225 void GestureTapDownAndUp(const gfx::Point& point); | 229 void GestureTapDownAndUp(const gfx::Point& point); |
| 226 | 230 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 // Set to true to cause events to be posted asynchronously. | 347 // Set to true to cause events to be posted asynchronously. |
| 344 bool async_; | 348 bool async_; |
| 345 | 349 |
| 346 DISALLOW_COPY_AND_ASSIGN(EventGenerator); | 350 DISALLOW_COPY_AND_ASSIGN(EventGenerator); |
| 347 }; | 351 }; |
| 348 | 352 |
| 349 } // namespace test | 353 } // namespace test |
| 350 } // namespace aura | 354 } // namespace aura |
| 351 | 355 |
| 352 #endif // UI_AURA_TEST_EVENT_GENERATOR_H_ | 356 #endif // UI_AURA_TEST_EVENT_GENERATOR_H_ |
| OLD | NEW |