| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // which uses the coordinates conversions and targeting provided by | 115 // which uses the coordinates conversions and targeting provided by |
| 116 // |delegate|. | 116 // |delegate|. |
| 117 explicit EventGenerator(EventGeneratorDelegate* delegate); | 117 explicit EventGenerator(EventGeneratorDelegate* delegate); |
| 118 | 118 |
| 119 // Creates an EventGenerator with the mouse/touch location | 119 // Creates an EventGenerator with the mouse/touch location |
| 120 // at |initial_location|, which uses the |root_window|'s coordinates. | 120 // at |initial_location|, which uses the |root_window|'s coordinates. |
| 121 EventGenerator(gfx::NativeWindow root_window, | 121 EventGenerator(gfx::NativeWindow root_window, |
| 122 const gfx::Point& initial_location); | 122 const gfx::Point& initial_location); |
| 123 | 123 |
| 124 // Creates an EventGenerator with the mouse/touch location centered over | 124 // Creates an EventGenerator with the mouse/touch location centered over |
| 125 // |window|. This is currently the only constructor that works on Mac, since | 125 // |window|. |
| 126 // a specific window is required (and there is no root window). | |
| 127 EventGenerator(gfx::NativeWindow root_window, gfx::NativeWindow window); | 126 EventGenerator(gfx::NativeWindow root_window, gfx::NativeWindow window); |
| 128 | 127 |
| 129 virtual ~EventGenerator(); | 128 virtual ~EventGenerator(); |
| 130 | 129 |
| 131 // Explicitly sets the location used by mouse/touch events. This is set by the | 130 // Explicitly sets the location used by mouse/touch events. This is set by the |
| 132 // various methods that take a location but can be manipulated directly, | 131 // various methods that take a location but can be manipulated directly, |
| 133 // typically for touch. | 132 // typically for touch. |
| 134 void set_current_location(const gfx::Point& location) { | 133 void set_current_location(const gfx::Point& location) { |
| 135 current_location_ = location; | 134 current_location_ = location; |
| 136 } | 135 } |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 bool targeting_application_; | 407 bool targeting_application_; |
| 409 std::unique_ptr<base::TickClock> tick_clock_; | 408 std::unique_ptr<base::TickClock> tick_clock_; |
| 410 | 409 |
| 411 DISALLOW_COPY_AND_ASSIGN(EventGenerator); | 410 DISALLOW_COPY_AND_ASSIGN(EventGenerator); |
| 412 }; | 411 }; |
| 413 | 412 |
| 414 } // namespace test | 413 } // namespace test |
| 415 } // namespace ui | 414 } // namespace ui |
| 416 | 415 |
| 417 #endif // UI_EVENTS_TEST_EVENT_GENERATOR_H_ | 416 #endif // UI_EVENTS_TEST_EVENT_GENERATOR_H_ |
| OLD | NEW |