OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SERVICES_UI_WS_TEST_UTILS_H_ | 5 #ifndef SERVICES_UI_WS_TEST_UTILS_H_ |
6 #define SERVICES_UI_WS_TEST_UTILS_H_ | 6 #define SERVICES_UI_WS_TEST_UTILS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 void OnEventAckTimeout(ClientSpecificId client_id) { | 224 void OnEventAckTimeout(ClientSpecificId client_id) { |
225 wms_->OnEventAckTimeout(client_id); | 225 wms_->OnEventAckTimeout(client_id); |
226 } | 226 } |
227 | 227 |
228 ClientSpecificId GetEventTargetClientId(const ServerWindow* window, | 228 ClientSpecificId GetEventTargetClientId(const ServerWindow* window, |
229 bool in_nonclient_area) { | 229 bool in_nonclient_area) { |
230 return wms_->GetEventTargetClientId(window, in_nonclient_area); | 230 return wms_->GetEventTargetClientId(window, in_nonclient_area); |
231 } | 231 } |
232 | 232 |
233 WindowTree* tree_awaiting_input_ack() { | 233 WindowTree* tree_awaiting_input_ack() { |
234 return wms_->in_flight_event_details_ ? wms_->in_flight_event_details_->tree | 234 return wms_->in_flight_event_dispatch_details_ |
235 : nullptr; | 235 ? wms_->in_flight_event_dispatch_details_->tree |
| 236 : nullptr; |
236 } | 237 } |
237 | 238 |
| 239 bool event_queue_empty() { return wms_->event_queue_.empty(); } |
| 240 |
238 const std::vector<std::unique_ptr<WindowManagerDisplayRoot>>& | 241 const std::vector<std::unique_ptr<WindowManagerDisplayRoot>>& |
239 window_manager_display_roots() const { | 242 window_manager_display_roots() const { |
240 return wms_->window_manager_display_roots_; | 243 return wms_->window_manager_display_roots_; |
241 } | 244 } |
242 | 245 |
243 bool AckInFlightEvent(mojom::EventResult result) { | 246 bool AckInFlightEvent(mojom::EventResult result) { |
244 if (!wms_->in_flight_event_details_) | 247 if (!wms_->in_flight_event_dispatch_details_) |
245 return false; | 248 return false; |
246 wms_->OnEventAck(wms_->in_flight_event_details_->tree, result); | 249 wms_->OnEventAck(wms_->in_flight_event_dispatch_details_->tree, result); |
247 return true; | 250 return true; |
248 } | 251 } |
249 | 252 |
250 private: | 253 private: |
251 WindowManagerState* wms_; | 254 WindowManagerState* wms_; |
252 | 255 |
253 DISALLOW_COPY_AND_ASSIGN(WindowManagerStateTestApi); | 256 DISALLOW_COPY_AND_ASSIGN(WindowManagerStateTestApi); |
254 }; | 257 }; |
255 | 258 |
256 // ----------------------------------------------------------------------------- | 259 // ----------------------------------------------------------------------------- |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 ClientWindowId* client_id = nullptr); | 726 ClientWindowId* client_id = nullptr); |
724 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, | 727 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, |
725 ServerWindow* parent, | 728 ServerWindow* parent, |
726 ClientWindowId* client_id = nullptr); | 729 ClientWindowId* client_id = nullptr); |
727 | 730 |
728 } // namespace test | 731 } // namespace test |
729 } // namespace ws | 732 } // namespace ws |
730 } // namespace ui | 733 } // namespace ui |
731 | 734 |
732 #endif // SERVICES_UI_WS_TEST_UTILS_H_ | 735 #endif // SERVICES_UI_WS_TEST_UTILS_H_ |
OLD | NEW |