| 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 void WindowServerTestBase::OnWmSetClientArea( | 255 void WindowServerTestBase::OnWmSetClientArea( |
| 256 aura::Window* window, | 256 aura::Window* window, |
| 257 const gfx::Insets& insets, | 257 const gfx::Insets& insets, |
| 258 const std::vector<gfx::Rect>& additional_client_areas) { | 258 const std::vector<gfx::Rect>& additional_client_areas) { |
| 259 if (window_manager_delegate_) { | 259 if (window_manager_delegate_) { |
| 260 window_manager_delegate_->OnWmSetClientArea(window, insets, | 260 window_manager_delegate_->OnWmSetClientArea(window, insets, |
| 261 additional_client_areas); | 261 additional_client_areas); |
| 262 } | 262 } |
| 263 } | 263 } |
| 264 | 264 |
| 265 bool WindowServerTestBase::IsWindowActive(aura::Window* window) { |
| 266 if (window_manager_delegate_) |
| 267 window_manager_delegate_->IsWindowActive(window); |
| 268 return false; |
| 269 } |
| 270 |
| 271 void WindowServerTestBase::OnWmDeactivateWindow(aura::Window* window) { |
| 272 if (window_manager_delegate_) |
| 273 window_manager_delegate_->OnWmDeactivateWindow(window); |
| 274 } |
| 275 |
| 265 void WindowServerTestBase::Create( | 276 void WindowServerTestBase::Create( |
| 266 const service_manager::Identity& remote_identity, | 277 const service_manager::Identity& remote_identity, |
| 267 mojom::WindowTreeClientRequest request) { | 278 mojom::WindowTreeClientRequest request) { |
| 268 window_tree_clients_.push_back(base::MakeUnique<aura::WindowTreeClient>( | 279 window_tree_clients_.push_back(base::MakeUnique<aura::WindowTreeClient>( |
| 269 connector(), this, nullptr, std::move(request))); | 280 connector(), this, nullptr, std::move(request))); |
| 270 } | 281 } |
| 271 | 282 |
| 272 bool WindowServerTestBase::DeleteWindowTreeHost( | 283 bool WindowServerTestBase::DeleteWindowTreeHost( |
| 273 aura::WindowTreeHostMus* window_tree_host) { | 284 aura::WindowTreeHostMus* window_tree_host) { |
| 274 for (auto iter = window_tree_hosts_.begin(); iter != window_tree_hosts_.end(); | 285 for (auto iter = window_tree_hosts_.begin(); iter != window_tree_hosts_.end(); |
| 275 ++iter) { | 286 ++iter) { |
| 276 if ((*iter).get() == window_tree_host) { | 287 if ((*iter).get() == window_tree_host) { |
| 277 window_tree_hosts_.erase(iter); | 288 window_tree_hosts_.erase(iter); |
| 278 return true; | 289 return true; |
| 279 } | 290 } |
| 280 } | 291 } |
| 281 return false; | 292 return false; |
| 282 } | 293 } |
| 283 | 294 |
| 284 } // namespace ui | 295 } // namespace ui |
| OLD | NEW |