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

Unified Diff: services/ui/ws/event_dispatcher.h

Issue 2884463002: Make event-targeting asynchronous in window server. (Closed)
Patch Set: comments Created 3 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
« no previous file with comments | « no previous file | services/ui/ws/event_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/event_dispatcher.h
diff --git a/services/ui/ws/event_dispatcher.h b/services/ui/ws/event_dispatcher.h
index 8d075b2e57774bc72f129d71fe616ca4ca7a398a..3cd80e920057ae1c755e379b25f1dfe23f004a20 100644
--- a/services/ui/ws/event_dispatcher.h
+++ b/services/ui/ws/event_dispatcher.h
@@ -63,7 +63,7 @@ class EventDispatcher : public ServerWindowObserver,
void Reset();
void SetMousePointerDisplayLocation(const gfx::Point& display_location,
- const int64_t display_id);
+ int64_t display_id);
const gfx::Point& mouse_pointer_last_location() const {
return mouse_pointer_last_location_;
}
@@ -142,18 +142,24 @@ class EventDispatcher : public ServerWindowObserver,
void RemoveAccelerator(uint32_t id);
+ // True if we are actively finding a target for an event, false otherwise.
+ bool IsProcessingEvent() const;
+
// Processes the supplied event, informing the delegate as approriate. This
// may result in generating any number of events. If |match_phase| is
// ANY and there is a matching accelerator with PRE_TARGET found, than only
// OnAccelerator() is called. The expectation is after the PRE_TARGET has been
// handled this is again called with an AcceleratorMatchPhase of POST_ONLY.
+ // This may be asynchronous if we need to find the target window for |event|
+ // asynchronously.
void ProcessEvent(const ui::Event& event,
- const int64_t display_id,
+ int64_t display_id,
AcceleratorMatchPhase match_phase);
// EventTargeterDelegate:
ServerWindow* GetRootWindowContaining(gfx::Point* location_in_display,
int64_t* display_id) override;
+ void ProcessNextAvailableEvent() override;
private:
friend class test::EventDispatcherTestApi;
@@ -208,7 +214,17 @@ class EventDispatcher : public ServerWindowObserver,
// when no buttons on the mouse are down.
// This also generates exit events as appropriate. For example, if the mouse
// moves between one window to another an exit is generated on the first.
- void ProcessPointerEvent(const ui::PointerEvent& event);
+ // |pointer_target| is the PointerTarget for |event| based on the
+ // |deepest_window|, the deepest visible window for the root_location
+ // of the |event|. |location_in_display| and |display_id| are updated values
+ // for root_location and |event_display_id_| (e.g. during drag-n-drop).
+ void ProcessPointerEventOnFoundTarget(const ui::PointerEvent& event,
+ const LocationTarget& location_target);
+
+ void UpdateNonClientAreaForCurrentWindowOnFoundWindow(
+ const LocationTarget& location_target);
+ void UpdateCursorProviderByLastKnownLocationOnFoundWindow(
+ const LocationTarget& location_target);
// Adds |pointer_target| to |pointer_targets_|.
void StartTrackingPointer(int32_t pointer_id,
« no previous file with comments | « no previous file | services/ui/ws/event_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698