| 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 COMPONENTS_MUS_WS_TEST_UTILS_H_ | 5 #ifndef COMPONENTS_MUS_WS_TEST_UTILS_H_ |
| 6 #define COMPONENTS_MUS_WS_TEST_UTILS_H_ | 6 #define COMPONENTS_MUS_WS_TEST_UTILS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 explicit WindowTreeTestApi(WindowTree* tree); | 71 explicit WindowTreeTestApi(WindowTree* tree); |
| 72 ~WindowTreeTestApi(); | 72 ~WindowTreeTestApi(); |
| 73 | 73 |
| 74 void set_user_id(const UserId& user_id) { tree_->user_id_ = user_id; } | 74 void set_user_id(const UserId& user_id) { tree_->user_id_ = user_id; } |
| 75 void set_window_manager_internal(mojom::WindowManager* wm_internal) { | 75 void set_window_manager_internal(mojom::WindowManager* wm_internal) { |
| 76 tree_->window_manager_internal_ = wm_internal; | 76 tree_->window_manager_internal_ = wm_internal; |
| 77 } | 77 } |
| 78 | 78 |
| 79 void ClearAck() { tree_->event_ack_id_ = 0; } | 79 void ClearAck() { tree_->event_ack_id_ = 0; } |
| 80 void EnableCapture() { tree_->event_ack_id_ = 1u; } | 80 void EnableCapture() { tree_->event_ack_id_ = 1u; } |
| 81 void AckLastEvent(mojom::EventResult result) { |
| 82 tree_->OnWindowInputEventAck(tree_->event_ack_id_, result); |
| 83 } |
| 81 | 84 |
| 82 void SetEventObserver(mojom::EventMatcherPtr matcher, | 85 void SetEventObserver(mojom::EventMatcherPtr matcher, |
| 83 uint32_t event_observer_id); | 86 uint32_t event_observer_id); |
| 84 | 87 |
| 85 private: | 88 private: |
| 86 WindowTree* tree_; | 89 WindowTree* tree_; |
| 87 | 90 |
| 88 DISALLOW_COPY_AND_ASSIGN(WindowTreeTestApi); | 91 DISALLOW_COPY_AND_ASSIGN(WindowTreeTestApi); |
| 89 }; | 92 }; |
| 90 | 93 |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 | 504 |
| 502 // Creates a new visible window as a child of the single root of |tree|. | 505 // Creates a new visible window as a child of the single root of |tree|. |
| 503 // |client_id| set to the ClientWindowId of the new window. | 506 // |client_id| set to the ClientWindowId of the new window. |
| 504 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); | 507 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); |
| 505 | 508 |
| 506 } // namespace test | 509 } // namespace test |
| 507 } // namespace ws | 510 } // namespace ws |
| 508 } // namespace mus | 511 } // namespace mus |
| 509 | 512 |
| 510 #endif // COMPONENTS_MUS_WS_TEST_UTILS_H_ | 513 #endif // COMPONENTS_MUS_WS_TEST_UTILS_H_ |
| OLD | NEW |