| 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 #include "components/mus/public/cpp/tests/test_window_tree_client_setup.h" | 5 #include "components/mus/public/cpp/tests/test_window_tree_client_setup.h" |
| 6 | 6 |
| 7 #include "components/mus/public/cpp/tests/test_window_tree.h" | 7 #include "components/mus/public/cpp/tests/test_window_tree.h" |
| 8 #include "components/mus/public/cpp/tests/window_tree_client_private.h" | 8 #include "components/mus/public/cpp/tests/window_tree_client_private.h" |
| 9 #include "components/mus/public/cpp/window_tree_client.h" | 9 #include "components/mus/public/cpp/window_tree_client.h" |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 WindowTreeClientPrivate(window_tree_client_.get()) | 30 WindowTreeClientPrivate(window_tree_client_.get()) |
| 31 .OnEmbed(window_tree_.get()); | 31 .OnEmbed(window_tree_.get()); |
| 32 } | 32 } |
| 33 | 33 |
| 34 WindowTreeClient* TestWindowTreeClientSetup::window_tree_client() { | 34 WindowTreeClient* TestWindowTreeClientSetup::window_tree_client() { |
| 35 return window_tree_client_.get(); | 35 return window_tree_client_.get(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 void TestWindowTreeClientSetup::OnWillDestroyClient( | 38 void TestWindowTreeClientSetup::OnWillDestroyClient( |
| 39 mus::WindowTreeClient* client) { | 39 mus::WindowTreeClient* client) { |
| 40 // |window_tree_| stubs out the connection to the Mus Window Server. So we |
| 41 // need to clear the client queue before tear down. |
| 42 WindowTreeClientPrivate(window_tree_client_.get()).ClearInFlightQueue(); |
| 40 // See comment in header as to why we do this. | 43 // See comment in header as to why we do this. |
| 41 window_tree_client_.release(); | 44 window_tree_client_.release(); |
| 42 } | 45 } |
| 43 | 46 |
| 44 } // namespace mus | 47 } // namespace mus |
| OLD | NEW |