| 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/ws/test_utils.h" | 5 #include "components/mus/ws/test_utils.h" |
| 6 | 6 |
| 7 #include "cc/output/copy_output_request.h" | 7 #include "cc/output/copy_output_request.h" |
| 8 #include "components/mus/surfaces/surfaces_state.h" | 8 #include "components/mus/surfaces/surfaces_state.h" |
| 9 #include "components/mus/ws/display_binding.h" | 9 #include "components/mus/ws/display_binding.h" |
| 10 #include "components/mus/ws/window_manager_factory_service.h" | 10 #include "components/mus/ws/window_manager_factory_service.h" |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 } | 240 } |
| 241 void TestWindowTreeBinding::SetIncomingMethodCallProcessingPaused(bool paused) { | 241 void TestWindowTreeBinding::SetIncomingMethodCallProcessingPaused(bool paused) { |
| 242 is_paused_ = paused; | 242 is_paused_ = paused; |
| 243 } | 243 } |
| 244 | 244 |
| 245 // TestConnectionManagerDelegate ---------------------------------------------- | 245 // TestConnectionManagerDelegate ---------------------------------------------- |
| 246 | 246 |
| 247 TestConnectionManagerDelegate::TestConnectionManagerDelegate() {} | 247 TestConnectionManagerDelegate::TestConnectionManagerDelegate() {} |
| 248 TestConnectionManagerDelegate::~TestConnectionManagerDelegate() {} | 248 TestConnectionManagerDelegate::~TestConnectionManagerDelegate() {} |
| 249 | 249 |
| 250 void TestConnectionManagerDelegate::OnNoMoreRootConnections() { | 250 void TestConnectionManagerDelegate::OnNoMoreDisplays() { |
| 251 got_on_no_more_connections_ = true; | 251 got_on_no_more_displays_ = true; |
| 252 } | 252 } |
| 253 | 253 |
| 254 scoped_ptr<WindowTreeBinding> | 254 scoped_ptr<WindowTreeBinding> |
| 255 TestConnectionManagerDelegate::CreateWindowTreeBindingForEmbedAtWindow( | 255 TestConnectionManagerDelegate::CreateWindowTreeBindingForEmbedAtWindow( |
| 256 ws::ConnectionManager* connection_manager, | 256 ws::ConnectionManager* connection_manager, |
| 257 ws::WindowTree* tree, | 257 ws::WindowTree* tree, |
| 258 mojom::WindowTreeRequest tree_request, | 258 mojom::WindowTreeRequest tree_request, |
| 259 mojom::WindowTreeClientPtr client) { | 259 mojom::WindowTreeClientPtr client) { |
| 260 scoped_ptr<TestWindowTreeBinding> binding(new TestWindowTreeBinding); | 260 scoped_ptr<TestWindowTreeBinding> binding(new TestWindowTreeBinding); |
| 261 last_binding_ = binding.get(); | 261 last_binding_ = binding.get(); |
| 262 return std::move(binding); | 262 return std::move(binding); |
| 263 } | 263 } |
| 264 | 264 |
| 265 void TestConnectionManagerDelegate::CreateDefaultDisplays() { | 265 void TestConnectionManagerDelegate::CreateDefaultDisplays() { |
| 266 DCHECK(num_displays_to_create_); | 266 DCHECK(num_displays_to_create_); |
| 267 DCHECK(connection_manager_); | 267 DCHECK(connection_manager_); |
| 268 | 268 |
| 269 for (int i = 0; i < num_displays_to_create_; ++i) { | 269 for (int i = 0; i < num_displays_to_create_; ++i) { |
| 270 // Display manages its own lifetime. | 270 // Display manages its own lifetime. |
| 271 Display* display = | 271 Display* display = |
| 272 new Display(connection_manager_, nullptr, scoped_refptr<GpuState>(), | 272 new Display(connection_manager_, nullptr, scoped_refptr<GpuState>(), |
| 273 scoped_refptr<mus::SurfacesState>()); | 273 scoped_refptr<mus::SurfacesState>()); |
| 274 display->Init(nullptr); | 274 display->Init(nullptr); |
| 275 } | 275 } |
| 276 } | 276 } |
| 277 | 277 |
| 278 } // namespace test | 278 } // namespace test |
| 279 } // namespace ws | 279 } // namespace ws |
| 280 } // namespace mus | 280 } // namespace mus |
| OLD | NEW |