| 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 <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 // a pointer type ui::EventPointerType::POINTER_TYPE_PEN. | 232 // a pointer type ui::EventPointerType::POINTER_TYPE_PEN. |
| 233 void EnterPenPointerMode(); | 233 void EnterPenPointerMode(); |
| 234 | 234 |
| 235 // Exit pen-pointer mode. Generated mouse events will use the default pointer | 235 // Exit pen-pointer mode. Generated mouse events will use the default pointer |
| 236 // type event. | 236 // type event. |
| 237 void ExitPenPointerMode(); | 237 void ExitPenPointerMode(); |
| 238 | 238 |
| 239 // Set radius of touch PointerDetails. | 239 // Set radius of touch PointerDetails. |
| 240 void SetTouchRadius(float x, float y); | 240 void SetTouchRadius(float x, float y); |
| 241 | 241 |
| 242 // Set tilt of touch PointerDetails. |
| 243 void SetTouchTilt(float x, float y); |
| 244 |
| 245 // Set pointer type of touch PointerDetails. |
| 246 void SetTouchPointerType(ui::EventPointerType type) { |
| 247 touch_pointer_details_.pointer_type = type; |
| 248 } |
| 249 |
| 250 // Set force of touch PointerDetails. |
| 251 void SetTouchForce(float force) { touch_pointer_details_.force = force; } |
| 252 |
| 242 // Generates a touch press event. | 253 // Generates a touch press event. |
| 243 void PressTouch(); | 254 void PressTouch(); |
| 244 | 255 |
| 245 // Generates a touch press event with |touch_id|. | 256 // Generates a touch press event with |touch_id|. |
| 246 void PressTouchId(int touch_id); | 257 void PressTouchId(int touch_id); |
| 247 | 258 |
| 248 // Generates a ET_TOUCH_MOVED event to |point|. | 259 // Generates a ET_TOUCH_MOVED event to |point|. |
| 249 void MoveTouch(const gfx::Point& point); | 260 void MoveTouch(const gfx::Point& point); |
| 250 | 261 |
| 251 // Generates a ET_TOUCH_MOVED event moving by (x, y) from current location. | 262 // Generates a ET_TOUCH_MOVED event moving by (x, y) from current location. |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 Target target_; | 448 Target target_; |
| 438 std::unique_ptr<base::TickClock> tick_clock_; | 449 std::unique_ptr<base::TickClock> tick_clock_; |
| 439 | 450 |
| 440 DISALLOW_COPY_AND_ASSIGN(EventGenerator); | 451 DISALLOW_COPY_AND_ASSIGN(EventGenerator); |
| 441 }; | 452 }; |
| 442 | 453 |
| 443 } // namespace test | 454 } // namespace test |
| 444 } // namespace ui | 455 } // namespace ui |
| 445 | 456 |
| 446 #endif // UI_EVENTS_TEST_EVENT_GENERATOR_H_ | 457 #endif // UI_EVENTS_TEST_EVENT_GENERATOR_H_ |
| OLD | NEW |