| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "services/ui/ws/window_server_test_base.h" | 5 #include "services/ui/ws/window_server_test_base.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 } | 264 } |
| 265 | 265 |
| 266 void WindowServerTestBase::OnWmDeactivateWindow(aura::Window* window) { | 266 void WindowServerTestBase::OnWmDeactivateWindow(aura::Window* window) { |
| 267 if (window_manager_delegate_) | 267 if (window_manager_delegate_) |
| 268 window_manager_delegate_->OnWmDeactivateWindow(window); | 268 window_manager_delegate_->OnWmDeactivateWindow(window); |
| 269 } | 269 } |
| 270 | 270 |
| 271 void WindowServerTestBase::Create( | 271 void WindowServerTestBase::Create( |
| 272 const service_manager::Identity& remote_identity, | 272 const service_manager::Identity& remote_identity, |
| 273 mojom::WindowTreeClientRequest request) { | 273 mojom::WindowTreeClientRequest request) { |
| 274 const bool create_discardable_memory = false; |
| 274 window_tree_clients_.push_back(base::MakeUnique<aura::WindowTreeClient>( | 275 window_tree_clients_.push_back(base::MakeUnique<aura::WindowTreeClient>( |
| 275 connector(), this, nullptr, std::move(request))); | 276 connector(), this, nullptr, std::move(request), nullptr, |
| 277 create_discardable_memory)); |
| 276 } | 278 } |
| 277 | 279 |
| 278 bool WindowServerTestBase::DeleteWindowTreeHost( | 280 bool WindowServerTestBase::DeleteWindowTreeHost( |
| 279 aura::WindowTreeHostMus* window_tree_host) { | 281 aura::WindowTreeHostMus* window_tree_host) { |
| 280 for (auto iter = window_tree_hosts_.begin(); iter != window_tree_hosts_.end(); | 282 for (auto iter = window_tree_hosts_.begin(); iter != window_tree_hosts_.end(); |
| 281 ++iter) { | 283 ++iter) { |
| 282 if ((*iter).get() == window_tree_host) { | 284 if ((*iter).get() == window_tree_host) { |
| 283 window_tree_hosts_.erase(iter); | 285 window_tree_hosts_.erase(iter); |
| 284 return true; | 286 return true; |
| 285 } | 287 } |
| 286 } | 288 } |
| 287 return false; | 289 return false; |
| 288 } | 290 } |
| 289 | 291 |
| 290 } // namespace ui | 292 } // namespace ui |
| OLD | NEW |