Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Unified Diff: ui/aura/test/event_generator.h

Issue 296403011: Support double-tap to click in touch accessibility controller. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update browser test for touch exploration too Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..c436d3fbd1165571fdcaaf950577ca499dbaa3e2 100644
--- a/ui/aura/test/event_generator.h
+++ b/ui/aura/test/event_generator.h
@@ -11,12 +11,13 @@
#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;
+class TickClock;
}
namespace ui {
@@ -317,6 +318,12 @@ class EventGenerator {
current_host_ = host;
}
+ // Specify an alternative tick clock to be used for simulating time in tests.
+ void SetTickClock(scoped_ptr<base::TickClock> tick_clock);
+
+ // Get the current time from the tick clock.
+ base::TimeDelta Now();
+
private:
// Dispatch a key event to the WindowEventDispatcher.
void DispatchKeyEvent(bool is_press, ui::KeyboardCode key_code, int flags);
@@ -346,6 +353,7 @@ class EventGenerator {
std::list<ui::Event*> pending_events_;
// Set to true to cause events to be posted asynchronously.
bool async_;
+ scoped_ptr<base::TickClock> tick_clock_;
DISALLOW_COPY_AND_ASSIGN(EventGenerator);
};
« no previous file with comments | « chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc ('k') | ui/aura/test/event_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698