| 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/property_utils.h" | 8 #include "ui/aura/mus/property_utils.h" |
| 9 #include "ui/aura/mus/window_tree_client.h" | 9 #include "ui/aura/mus/window_tree_client.h" |
| 10 #include "ui/aura/mus/window_tree_host_mus.h" | 10 #include "ui/aura/mus/window_tree_host_mus.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 const std::string& name, | 163 const std::string& name, |
| 164 std::unique_ptr<std::vector<uint8_t>>* new_data) { | 164 std::unique_ptr<std::vector<uint8_t>>* new_data) { |
| 165 return true; | 165 return true; |
| 166 } | 166 } |
| 167 | 167 |
| 168 Window* AuraTestBase::OnWmCreateTopLevelWindow( | 168 Window* AuraTestBase::OnWmCreateTopLevelWindow( |
| 169 ui::mojom::WindowType window_type, | 169 ui::mojom::WindowType window_type, |
| 170 std::map<std::string, std::vector<uint8_t>>* properties) { | 170 std::map<std::string, std::vector<uint8_t>>* properties) { |
| 171 Window* window = new Window(nullptr); | 171 Window* window = new Window(nullptr); |
| 172 SetWindowType(window, window_type); | 172 SetWindowType(window, window_type); |
| 173 window->Init(ui::LAYER_NOT_DRAWN); |
| 173 return window; | 174 return window; |
| 174 } | 175 } |
| 175 | 176 |
| 176 void AuraTestBase::OnWmClientJankinessChanged( | 177 void AuraTestBase::OnWmClientJankinessChanged( |
| 177 const std::set<Window*>& client_windows, | 178 const std::set<Window*>& client_windows, |
| 178 bool janky) {} | 179 bool janky) {} |
| 179 | 180 |
| 180 void AuraTestBase::OnWmNewDisplay( | 181 void AuraTestBase::OnWmNewDisplay( |
| 181 std::unique_ptr<WindowTreeHostMus> window_tree_host, | 182 std::unique_ptr<WindowTreeHostMus> window_tree_host, |
| 182 const display::Display& display) { | 183 const display::Display& display) { |
| 183 // Take ownership of the WindowTreeHost. | 184 // Take ownership of the WindowTreeHost. |
| 184 window_tree_host_mus_ = std::move(window_tree_host); | 185 window_tree_host_mus_ = std::move(window_tree_host); |
| 185 } | 186 } |
| 186 | 187 |
| 187 void AuraTestBase::OnWmDisplayRemoved(Window* window) {} | 188 void AuraTestBase::OnWmDisplayRemoved(WindowTreeHostMus* window_tree_host) { |
| 189 if (window_tree_host_mus_.get() == window_tree_host) |
| 190 window_tree_host_mus_.reset(); |
| 191 } |
| 188 | 192 |
| 189 void AuraTestBase::OnWmDisplayModified(const display::Display& display) {} | 193 void AuraTestBase::OnWmDisplayModified(const display::Display& display) {} |
| 190 | 194 |
| 191 ui::mojom::EventResult AuraTestBase::OnAccelerator(uint32_t id, | 195 ui::mojom::EventResult AuraTestBase::OnAccelerator(uint32_t id, |
| 192 const ui::Event& event) { | 196 const ui::Event& event) { |
| 193 return ui::mojom::EventResult::HANDLED; | 197 return ui::mojom::EventResult::HANDLED; |
| 194 } | 198 } |
| 195 | 199 |
| 196 void AuraTestBase::OnWmPerformMoveLoop( | 200 void AuraTestBase::OnWmPerformMoveLoop( |
| 197 Window* window, | 201 Window* window, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 217 | 221 |
| 218 void AuraTestBaseWithType::SetUp() { | 222 void AuraTestBaseWithType::SetUp() { |
| 219 DCHECK(!setup_called_); | 223 DCHECK(!setup_called_); |
| 220 setup_called_ = true; | 224 setup_called_ = true; |
| 221 ConfigureBackend(GetParam()); | 225 ConfigureBackend(GetParam()); |
| 222 AuraTestBase::SetUp(); | 226 AuraTestBase::SetUp(); |
| 223 } | 227 } |
| 224 | 228 |
| 225 } // namespace test | 229 } // namespace test |
| 226 } // namespace aura | 230 } // namespace aura |
| OLD | NEW |