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

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

Issue 2752903002: Make ui::test::EventGenerator work with PointerEvents in mash (Closed)
Patch Set: review comments 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
« no previous file with comments | « ui/aura/test/mus/window_tree_client_private.cc ('k') | ui/events/test/event_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..51268390a42ba1637d3bae85982daa1b656e0e9e 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(const Event& event);
+
const EventGeneratorDelegate* delegate() const;
EventGeneratorDelegate* delegate();
« no previous file with comments | « ui/aura/test/mus/window_tree_client_private.cc ('k') | ui/events/test/event_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698