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 <vector> | 10 #include <vector> |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 class WindowTreeTestApi { | 88 class WindowTreeTestApi { |
89 public: | 89 public: |
90 explicit WindowTreeTestApi(WindowTree* tree); | 90 explicit WindowTreeTestApi(WindowTree* tree); |
91 ~WindowTreeTestApi(); | 91 ~WindowTreeTestApi(); |
92 | 92 |
93 void set_user_id(const UserId& user_id) { tree_->user_id_ = user_id; } | 93 void set_user_id(const UserId& user_id) { tree_->user_id_ = user_id; } |
94 void set_window_manager_internal(mojom::WindowManager* wm_internal) { | 94 void set_window_manager_internal(mojom::WindowManager* wm_internal) { |
95 tree_->window_manager_internal_ = wm_internal; | 95 tree_->window_manager_internal_ = wm_internal; |
96 } | 96 } |
| 97 void SetCanAcceptEvents(Id transport_window_id, bool can_accept_events) { |
| 98 tree_->SetCanAcceptEvents(transport_window_id, can_accept_events); |
| 99 } |
97 void AckOldestEvent() { | 100 void AckOldestEvent() { |
98 tree_->OnWindowInputEventAck(tree_->event_ack_id_, | 101 tree_->OnWindowInputEventAck(tree_->event_ack_id_, |
99 mojom::EventResult::UNHANDLED); | 102 mojom::EventResult::UNHANDLED); |
100 } | 103 } |
101 void EnableCapture() { tree_->event_ack_id_ = 1u; } | 104 void EnableCapture() { tree_->event_ack_id_ = 1u; } |
102 void AckLastEvent(mojom::EventResult result) { | 105 void AckLastEvent(mojom::EventResult result) { |
103 tree_->OnWindowInputEventAck(tree_->event_ack_id_, result); | 106 tree_->OnWindowInputEventAck(tree_->event_ack_id_, result); |
104 } | 107 } |
105 void AckLastAccelerator(mojom::EventResult result) { | 108 void AckLastAccelerator(mojom::EventResult result) { |
106 tree_->OnAcceleratorAck(tree_->event_ack_id_, result); | 109 tree_->OnAcceleratorAck(tree_->event_ack_id_, result); |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); | 569 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); |
567 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, | 570 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, |
568 ServerWindow* parent, | 571 ServerWindow* parent, |
569 ClientWindowId* client_id); | 572 ClientWindowId* client_id); |
570 | 573 |
571 } // namespace test | 574 } // namespace test |
572 } // namespace ws | 575 } // namespace ws |
573 } // namespace ui | 576 } // namespace ui |
574 | 577 |
575 #endif // SERVICES_UI_WS_TEST_UTILS_H_ | 578 #endif // SERVICES_UI_WS_TEST_UTILS_H_ |
OLD | NEW |