| Index: ui/aura/test/event_generator.h
|
| diff --git a/ui/aura/test/event_generator.h b/ui/aura/test/event_generator.h
|
| index 29832b14f11aabd48f7e7cb508831996c4ddc317..15939489771576d4f546787ef7347364f042bebf 100644
|
| --- a/ui/aura/test/event_generator.h
|
| +++ b/ui/aura/test/event_generator.h
|
| @@ -11,14 +11,11 @@
|
| #include "base/basictypes.h"
|
| #include "base/callback.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "base/time/time.h"
|
| #include "ui/events/event_constants.h"
|
| #include "ui/events/keycodes/keyboard_codes.h"
|
| #include "ui/gfx/point.h"
|
|
|
| -namespace base {
|
| -class TimeDelta;
|
| -}
|
| -
|
| namespace ui {
|
| class Event;
|
| class EventProcessor;
|
| @@ -317,6 +314,12 @@ class EventGenerator {
|
| current_host_ = host;
|
| }
|
|
|
| + // If this is set, the given value will be used as the time for all
|
| + // events, rather than the current time.
|
| + void set_simulated_time(base::TimeDelta simulated_time) {
|
| + simulated_time_ = simulated_time;
|
| + }
|
| +
|
| private:
|
| // Dispatch a key event to the WindowEventDispatcher.
|
| void DispatchKeyEvent(bool is_press, ui::KeyboardCode key_code, int flags);
|
| @@ -338,6 +341,8 @@ class EventGenerator {
|
| void DispatchNextPendingEvent();
|
| void DoDispatchEvent(ui::Event* event, bool async);
|
|
|
| + base::TimeDelta Now();
|
| +
|
| scoped_ptr<EventGeneratorDelegate> delegate_;
|
| gfx::Point current_location_;
|
| WindowTreeHost* current_host_;
|
| @@ -346,6 +351,7 @@ class EventGenerator {
|
| std::list<ui::Event*> pending_events_;
|
| // Set to true to cause events to be posted asynchronously.
|
| bool async_;
|
| + base::TimeDelta simulated_time_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(EventGenerator);
|
| };
|
|
|