| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // cases: | 69 // cases: |
| 70 // | 70 // |
| 71 // 1) If your test depends on native events (ui::Event::native_event()). | 71 // 1) If your test depends on native events (ui::Event::native_event()). |
| 72 // This return is empty/NULL event with EventGenerator. | 72 // This return is empty/NULL event with EventGenerator. |
| 73 // 2) If your test involves nested message loop, such as | 73 // 2) If your test involves nested message loop, such as |
| 74 // menu or drag & drop. Because this class directly | 74 // menu or drag & drop. Because this class directly |
| 75 // post an event to RootWindow, this event will not be | 75 // post an event to RootWindow, this event will not be |
| 76 // handled in the nested message loop. | 76 // handled in the nested message loop. |
| 77 // 3) Similarly, |base::MessagePumpObserver| will not be invoked. | 77 // 3) Similarly, |base::MessagePumpObserver| will not be invoked. |
| 78 // 4) Any other code that requires native events, such as | 78 // 4) Any other code that requires native events, such as |
| 79 // tests for WindowTreeHostWin/WindowTreeHostX11. | 79 // tests for RootWindowHostWin/RootWindowHostX11. |
| 80 // | 80 // |
| 81 // If one of these applies to your test, please use |ui_controls| | 81 // If one of these applies to your test, please use |ui_controls| |
| 82 // package instead. | 82 // package instead. |
| 83 // | 83 // |
| 84 // Note: The coordinates of the points in API is determined by the | 84 // Note: The coordinates of the points in API is determined by the |
| 85 // EventGeneratorDelegate. | 85 // EventGeneratorDelegate. |
| 86 class EventGenerator { | 86 class EventGenerator { |
| 87 public: | 87 public: |
| 88 // Creates an EventGenerator with the mouse/touch location (0,0), | 88 // Creates an EventGenerator with the mouse/touch location (0,0), |
| 89 // which uses the |root_window|'s coordinates. | 89 // which uses the |root_window|'s coordinates. |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 // Set to true to cause events to be posted asynchronously. | 343 // Set to true to cause events to be posted asynchronously. |
| 344 bool async_; | 344 bool async_; |
| 345 | 345 |
| 346 DISALLOW_COPY_AND_ASSIGN(EventGenerator); | 346 DISALLOW_COPY_AND_ASSIGN(EventGenerator); |
| 347 }; | 347 }; |
| 348 | 348 |
| 349 } // namespace test | 349 } // namespace test |
| 350 } // namespace aura | 350 } // namespace aura |
| 351 | 351 |
| 352 #endif // UI_AURA_TEST_EVENT_GENERATOR_H_ | 352 #endif // UI_AURA_TEST_EVENT_GENERATOR_H_ |
| OLD | NEW |