| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "ui/gfx/point.h" | 10 #include "ui/gfx/point.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 // Generates a left button press event. | 35 // Generates a left button press event. |
| 36 void PressLeftButton(); | 36 void PressLeftButton(); |
| 37 | 37 |
| 38 // Generates a left button release event. | 38 // Generates a left button release event. |
| 39 void ReleaseLeftButton(); | 39 void ReleaseLeftButton(); |
| 40 | 40 |
| 41 // Generates events to click (press, release) left button. | 41 // Generates events to click (press, release) left button. |
| 42 void ClickLeftButton(); | 42 void ClickLeftButton(); |
| 43 | 43 |
| 44 // Generates a double click event using the left button. |
| 45 void DoubleClickLeftButton(); |
| 46 |
| 44 // Generates events to move mouse to be the given |point|. | 47 // Generates events to move mouse to be the given |point|. |
| 45 void MoveMouseTo(const gfx::Point& point); | 48 void MoveMouseTo(const gfx::Point& point); |
| 46 | 49 |
| 47 void MoveMouseTo(int x, int y) { | 50 void MoveMouseTo(int x, int y) { |
| 48 MoveMouseTo(gfx::Point(x, y)); | 51 MoveMouseTo(gfx::Point(x, y)); |
| 49 } | 52 } |
| 50 | 53 |
| 51 void MoveMouseBy(int x, int y) { | 54 void MoveMouseBy(int x, int y) { |
| 52 MoveMouseTo(current_location_.Add(gfx::Point(x, y))); | 55 MoveMouseTo(current_location_.Add(gfx::Point(x, y))); |
| 53 } | 56 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 73 int flags_; | 76 int flags_; |
| 74 gfx::Point current_location_; | 77 gfx::Point current_location_; |
| 75 | 78 |
| 76 DISALLOW_COPY_AND_ASSIGN(EventGenerator); | 79 DISALLOW_COPY_AND_ASSIGN(EventGenerator); |
| 77 }; | 80 }; |
| 78 | 81 |
| 79 } // namespace test | 82 } // namespace test |
| 80 } // namespace aura | 83 } // namespace aura |
| 81 | 84 |
| 82 #endif // UI_AURA_TEST_EVENT_GENERATOR_H_ | 85 #endif // UI_AURA_TEST_EVENT_GENERATOR_H_ |
| OLD | NEW |