| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 class WindowTreeTestApi { | 100 class WindowTreeTestApi { |
| 101 public: | 101 public: |
| 102 explicit WindowTreeTestApi(WindowTree* tree); | 102 explicit WindowTreeTestApi(WindowTree* tree); |
| 103 ~WindowTreeTestApi(); | 103 ~WindowTreeTestApi(); |
| 104 | 104 |
| 105 void set_user_id(const UserId& user_id) { tree_->user_id_ = user_id; } | 105 void set_user_id(const UserId& user_id) { tree_->user_id_ = user_id; } |
| 106 void set_window_manager_internal(mojom::WindowManager* wm_internal) { | 106 void set_window_manager_internal(mojom::WindowManager* wm_internal) { |
| 107 tree_->window_manager_internal_ = wm_internal; | 107 tree_->window_manager_internal_ = wm_internal; |
| 108 } | 108 } |
| 109 void SetCanAcceptEvents(Id transport_window_id, bool can_accept_events) { | 109 void SetEventTargetingPolicy(Id transport_window_id, |
| 110 tree_->SetCanAcceptEvents(transport_window_id, can_accept_events); | 110 mojom::EventTargetingPolicy policy) { |
| 111 tree_->SetEventTargetingPolicy(transport_window_id, policy); |
| 111 } | 112 } |
| 112 void AckOldestEvent( | 113 void AckOldestEvent( |
| 113 mojom::EventResult result = mojom::EventResult::UNHANDLED) { | 114 mojom::EventResult result = mojom::EventResult::UNHANDLED) { |
| 114 tree_->OnWindowInputEventAck(tree_->event_ack_id_, result); | 115 tree_->OnWindowInputEventAck(tree_->event_ack_id_, result); |
| 115 } | 116 } |
| 116 void EnableCapture() { tree_->event_ack_id_ = 1u; } | 117 void EnableCapture() { tree_->event_ack_id_ = 1u; } |
| 117 void AckLastEvent(mojom::EventResult result) { | 118 void AckLastEvent(mojom::EventResult result) { |
| 118 tree_->OnWindowInputEventAck(tree_->event_ack_id_, result); | 119 tree_->OnWindowInputEventAck(tree_->event_ack_id_, result); |
| 119 } | 120 } |
| 120 void AckLastAccelerator(mojom::EventResult result) { | 121 void AckLastAccelerator(mojom::EventResult result) { |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); | 674 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); |
| 674 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, | 675 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, |
| 675 ServerWindow* parent, | 676 ServerWindow* parent, |
| 676 ClientWindowId* client_id); | 677 ClientWindowId* client_id); |
| 677 | 678 |
| 678 } // namespace test | 679 } // namespace test |
| 679 } // namespace ws | 680 } // namespace ws |
| 680 } // namespace ui | 681 } // namespace ui |
| 681 | 682 |
| 682 #endif // SERVICES_UI_WS_TEST_UTILS_H_ | 683 #endif // SERVICES_UI_WS_TEST_UTILS_H_ |
| OLD | NEW |