| 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_PUBLIC_CPP_TESTS_WINDOW_TREE_CLIENT_PRIVATE_H_ | 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_TREE_CLIENT_PRIVATE_H_ |
| 6 #define COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_TREE_CLIENT_PRIVATE_H_ | 6 #define COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_TREE_CLIENT_PRIVATE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 ~WindowTreeClientPrivate(); | 31 ~WindowTreeClientPrivate(); |
| 32 | 32 |
| 33 uint32_t event_observer_id(); | 33 uint32_t event_observer_id(); |
| 34 | 34 |
| 35 // Calls OnEmbed() on the WindowTreeClient. | 35 // Calls OnEmbed() on the WindowTreeClient. |
| 36 void OnEmbed(mojom::WindowTree* window_tree); | 36 void OnEmbed(mojom::WindowTree* window_tree); |
| 37 | 37 |
| 38 // Pretends that |event| has been received from the window server. | 38 // Pretends that |event| has been received from the window server. |
| 39 void CallOnWindowInputEvent(Window* window, std::unique_ptr<ui::Event> event); | 39 void CallOnWindowInputEvent(Window* window, std::unique_ptr<ui::Event> event); |
| 40 | 40 |
| 41 // For tests which do not connect to the Mus Window Server, the stubbed |
| 42 // connection does not respond to messages. This clears the in flight queue of |
| 43 // requests so that tear down can occur. |
| 44 void ClearInFlightQueue(); |
| 45 |
| 46 // For tests which do connect to the Mus Window Server. This runs until the |
| 47 // |tree_client_impl_| has received acknowledgements for each message sent to |
| 48 // the server. |
| 49 void WaitForInFlightQueue(); |
| 50 |
| 41 private: | 51 private: |
| 42 WindowTreeClient* tree_client_impl_; | 52 WindowTreeClient* tree_client_impl_; |
| 43 | 53 |
| 44 DISALLOW_COPY_AND_ASSIGN(WindowTreeClientPrivate); | 54 DISALLOW_COPY_AND_ASSIGN(WindowTreeClientPrivate); |
| 45 }; | 55 }; |
| 46 | 56 |
| 47 } // namespace mus | 57 } // namespace mus |
| 48 | 58 |
| 49 #endif // COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_TREE_CLIENT_PRIVATE_H_ | 59 #endif // COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_TREE_CLIENT_PRIVATE_H_ |
| OLD | NEW |