Several accessibility features in chromeos (e.g. autoclick, magnifier) need to track the mouse-cursor when it moves. In mus, it is possible to install event observers that get notified when some events happen. However, we only allow a subset of events to be observed like this (https://cs.chromium.org/chromium/src/services/ui/ws/window_tree.cc?sq=package:chromium&dr=CSs&l=1173). It is possible to observe for all mouse events, by using a 'pointer kind matcher' instead (which is used by the touch hud to observe all touch events; issue 588311 ). However, considering mouse-move (and I suppose touch-move too) events can happen very frequently, we should consider throttling how often we notify the observers. For example, perhaps notify at most X times every second, and only if the cursor moved at least Y pixels.
TouchEventWatcher (https://cs.chromium.org/chromium/src/ui/views/touch_event_watcher.h?sq=package:chromium&dr=CSs&l=28) should also be updated to be a PointerEventWatcher, so that it can be used to observe either all Touch or all Mouse events.
Comment 1 by sadrul@chromium.org
, Jul 15 2016