OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/aura/test/aura_test_base.h" | 5 #include "ui/aura/test/aura_test_base.h" |
6 | 6 |
7 #include "ui/aura/client/window_parenting_client.h" | 7 #include "ui/aura/client/window_parenting_client.h" |
8 #include "ui/aura/mus/window_tree_client.h" | 8 #include "ui/aura/mus/window_tree_client.h" |
9 #include "ui/aura/mus/window_tree_host_mus.h" | 9 #include "ui/aura/mus/window_tree_host_mus.h" |
10 #include "ui/aura/test/test_window_delegate.h" | 10 #include "ui/aura/test/test_window_delegate.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 const std::set<Window*>& client_windows, | 173 const std::set<Window*>& client_windows, |
174 bool janky) {} | 174 bool janky) {} |
175 | 175 |
176 void AuraTestBase::OnWmNewDisplay( | 176 void AuraTestBase::OnWmNewDisplay( |
177 std::unique_ptr<WindowTreeHostMus> window_tree_host, | 177 std::unique_ptr<WindowTreeHostMus> window_tree_host, |
178 const display::Display& display) { | 178 const display::Display& display) { |
179 // Take ownership of the WindowTreeHost. | 179 // Take ownership of the WindowTreeHost. |
180 window_tree_host_mus_ = std::move(window_tree_host); | 180 window_tree_host_mus_ = std::move(window_tree_host); |
181 } | 181 } |
182 | 182 |
183 void AuraTestBase::OnWmDisplayRemoved(Window* window) {} | 183 void AuraTestBase::OnWmDisplayRemoved(WindowTreeHostMus* window_tree_host) { |
| 184 if (window_tree_host_mus_.get() == window_tree_host) |
| 185 window_tree_host_mus_.reset(); |
| 186 } |
184 | 187 |
185 void AuraTestBase::OnWmDisplayModified(const display::Display& display) {} | 188 void AuraTestBase::OnWmDisplayModified(const display::Display& display) {} |
186 | 189 |
187 ui::mojom::EventResult AuraTestBase::OnAccelerator(uint32_t id, | 190 ui::mojom::EventResult AuraTestBase::OnAccelerator(uint32_t id, |
188 const ui::Event& event) { | 191 const ui::Event& event) { |
189 return ui::mojom::EventResult::HANDLED; | 192 return ui::mojom::EventResult::HANDLED; |
190 } | 193 } |
191 | 194 |
192 void AuraTestBase::OnWmPerformMoveLoop( | 195 void AuraTestBase::OnWmPerformMoveLoop( |
193 Window* window, | 196 Window* window, |
(...skipping 19 matching lines...) Expand all Loading... |
213 | 216 |
214 void AuraTestBaseWithType::SetUp() { | 217 void AuraTestBaseWithType::SetUp() { |
215 DCHECK(!setup_called_); | 218 DCHECK(!setup_called_); |
216 setup_called_ = true; | 219 setup_called_ = true; |
217 ConfigureBackend(GetParam()); | 220 ConfigureBackend(GetParam()); |
218 AuraTestBase::SetUp(); | 221 AuraTestBase::SetUp(); |
219 } | 222 } |
220 | 223 |
221 } // namespace test | 224 } // namespace test |
222 } // namespace aura | 225 } // namespace aura |
OLD | NEW |