| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EVENTS_TEST_EVENT_GENERATOR_H_ | 5 #ifndef UI_EVENTS_TEST_EVENT_GENERATOR_H_ |
| 6 #define UI_EVENTS_TEST_EVENT_GENERATOR_H_ | 6 #define UI_EVENTS_TEST_EVENT_GENERATOR_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 const base::TimeDelta& step_delay, | 308 const base::TimeDelta& step_delay, |
| 309 float x_offset, | 309 float x_offset, |
| 310 float y_offset, | 310 float y_offset, |
| 311 int steps, | 311 int steps, |
| 312 int num_fingers); | 312 int num_fingers); |
| 313 | 313 |
| 314 // Generates scroll sequences of a FlingCancel, Scrolls, FlingStart, sending | 314 // Generates scroll sequences of a FlingCancel, Scrolls, FlingStart, sending |
| 315 // scrolls of each of the values in |offsets|. | 315 // scrolls of each of the values in |offsets|. |
| 316 void ScrollSequence(const gfx::Point& start, | 316 void ScrollSequence(const gfx::Point& start, |
| 317 const base::TimeDelta& step_delay, | 317 const base::TimeDelta& step_delay, |
| 318 const std::vector<gfx::Point>& offsets, | 318 const std::vector<gfx::PointF>& offsets, |
| 319 int num_fingers); | 319 int num_fingers); |
| 320 | 320 |
| 321 // Generates a key press event. On platforms except Windows and X11, a key | 321 // Generates a key press event. On platforms except Windows and X11, a key |
| 322 // event without native_event() is generated. Note that ui::EF_ flags should | 322 // event without native_event() is generated. Note that ui::EF_ flags should |
| 323 // be passed as |flags|, not the native ones like 'ShiftMask' in <X11/X.h>. | 323 // be passed as |flags|, not the native ones like 'ShiftMask' in <X11/X.h>. |
| 324 // TODO(yusukes): Support native_event() on all platforms. | 324 // TODO(yusukes): Support native_event() on all platforms. |
| 325 void PressKey(KeyboardCode key_code, int flags); | 325 void PressKey(KeyboardCode key_code, int flags); |
| 326 | 326 |
| 327 // Generates a key release event. On platforms except Windows and X11, a key | 327 // Generates a key release event. On platforms except Windows and X11, a key |
| 328 // event without native_event() is generated. Note that ui::EF_ flags should | 328 // event without native_event() is generated. Note that ui::EF_ flags should |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 bool async_; | 376 bool async_; |
| 377 scoped_ptr<base::TickClock> tick_clock_; | 377 scoped_ptr<base::TickClock> tick_clock_; |
| 378 | 378 |
| 379 DISALLOW_COPY_AND_ASSIGN(EventGenerator); | 379 DISALLOW_COPY_AND_ASSIGN(EventGenerator); |
| 380 }; | 380 }; |
| 381 | 381 |
| 382 } // namespace test | 382 } // namespace test |
| 383 } // namespace ui | 383 } // namespace ui |
| 384 | 384 |
| 385 #endif // UI_EVENTS_TEST_EVENT_GENERATOR_H_ | 385 #endif // UI_EVENTS_TEST_EVENT_GENERATOR_H_ |
| OLD | NEW |