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

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

Issue 2752903002: Make ui::test::EventGenerator work with PointerEvents in mash (Closed)
Patch Set: Created 3 years, 9 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/events/test/event_generator.h
diff --git a/ui/events/test/event_generator.h b/ui/events/test/event_generator.h
index 8d40e577ca47ddb829024a52486f4f44fcb146d2..649027cd6f7cc7c09b47253d27248a36c1983625 100644
--- a/ui/events/test/event_generator.h
+++ b/ui/events/test/event_generator.h
@@ -69,11 +69,16 @@ class EventGeneratorDelegate {
virtual void ConvertPointFromHost(const EventTarget* hosted_target,
gfx::Point* point) const = 0;
- // Detemines whether the input method should be the first to handle key events
- // before dispathcing to Views. If it does, the given |event| will be
+ // Determines if the input method should be the first to handle key events
+ // before dispatching to Views. If it does, the given |event| will be
// dispatched and processed by the input method from the host of |target|.
virtual void DispatchKeyEventToIME(EventTarget* target,
ui::KeyEvent* event) = 0;
+
+ // Offers the event to pointer watchers on systems that provide them.
+ // Does not consume the event (pointer watchers cannot consume events).
+ virtual void DispatchEventToPointerWatchers(EventTarget* target,
+ const PointerEvent& event) {}
};
// ui::test::EventGenerator is a tool that generates and dispatches events.
@@ -432,6 +437,10 @@ class EventGenerator {
void DispatchNextPendingEvent();
void DoDispatchEvent(Event* event, bool async);
+ // Offers event to pointer watchers (via delegate) if the event is a mouse or
+ // touch event.
+ void MaybeDispatchToPointerWatchers(Event* event);
+
const EventGeneratorDelegate* delegate() const;
EventGeneratorDelegate* delegate();

Powered by Google App Engine
This is Rietveld 408576698