Index: services/ui/ws/window_manager_state.h |
diff --git a/services/ui/ws/window_manager_state.h b/services/ui/ws/window_manager_state.h |
index ce897244a81ee49e82e48e4f17faf0a33184868e..d801681abb0d2fad9cdcd5a411f181dd232848ff 100644 |
--- a/services/ui/ws/window_manager_state.h |
+++ b/services/ui/ws/window_manager_state.h |
@@ -153,13 +153,13 @@ class WindowManagerState : public EventDispatcherDelegate, |
}; |
// Tracks state associated with an event being dispatched to a client. |
- struct InFlightEventDetails { |
- InFlightEventDetails(WindowManagerState* window_manager_state, |
- WindowTree* tree, |
- int64_t display_id, |
- const Event& event, |
- EventDispatchPhase phase); |
- ~InFlightEventDetails(); |
+ struct InFlightEventDispatchDetails { |
+ InFlightEventDispatchDetails(WindowManagerState* window_manager_state, |
+ WindowTree* tree, |
+ int64_t display_id, |
+ const Event& event, |
+ EventDispatchPhase phase); |
+ ~InFlightEventDispatchDetails(); |
base::OneShotTimer timer; |
WindowTree* tree; |
@@ -213,11 +213,6 @@ class WindowManagerState : public EventDispatcherDelegate, |
std::unique_ptr<ProcessedEventTarget> processed_event_target, |
int64_t display_id); |
- // Processes the next valid event in |event_queue_|. If the event has already |
- // been processed it is dispatched, otherwise the event is passed to the |
- // EventDispatcher for processing. |
- void ProcessNextEventFromQueue(); |
- |
// Dispatches the event to the appropriate client and starts the ack timer. |
void DispatchInputEventToWindowImpl(ServerWindow* target, |
ClientSpecificId client_id, |
@@ -256,6 +251,10 @@ class WindowManagerState : public EventDispatcherDelegate, |
ClientSpecificId client_id, |
const Event& event, |
Accelerator* accelerator) override; |
+ // Processes the next valid event in |event_queue_|. If the event has already |
+ // been processed it is dispatched, otherwise the event is passed to the |
+ // EventDispatcher for processing. |
+ void ProcessNextEventFromQueue() override; |
ClientSpecificId GetEventTargetClientId(const ServerWindow* window, |
bool in_nonclient_area) override; |
ServerWindow* GetRootWindowContaining(gfx::Point* location) override; |
@@ -272,13 +271,16 @@ class WindowManagerState : public EventDispatcherDelegate, |
bool got_frame_decoration_values_ = false; |
mojom::FrameDecorationValuesPtr frame_decoration_values_; |
+ // Events can go into this queue if there's a hit-test in flight in |
+ // EventDispatcher or if we are actively dispatching an event. |
std::queue<std::unique_ptr<QueuedEvent>> event_queue_; |
std::vector<DebugAccelerator> debug_accelerators_; |
// If non-null we're actively waiting for a response from a client for an |
// event. |
- std::unique_ptr<InFlightEventDetails> in_flight_event_details_; |
+ std::unique_ptr<InFlightEventDispatchDetails> |
+ in_flight_event_dispatch_details_; |
EventDispatcher event_dispatcher_; |