| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/compositor/test/in_process_context_factory.h" | 5 #include "ui/compositor/test/in_process_context_factory.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 } | 289 } |
| 290 | 290 |
| 291 cc::FrameSinkId InProcessContextFactory::AllocateFrameSinkId() { | 291 cc::FrameSinkId InProcessContextFactory::AllocateFrameSinkId() { |
| 292 return frame_sink_id_allocator_.NextFrameSinkId(); | 292 return frame_sink_id_allocator_.NextFrameSinkId(); |
| 293 } | 293 } |
| 294 | 294 |
| 295 cc::SurfaceManager* InProcessContextFactory::GetSurfaceManager() { | 295 cc::SurfaceManager* InProcessContextFactory::GetSurfaceManager() { |
| 296 return surface_manager_; | 296 return surface_manager_; |
| 297 } | 297 } |
| 298 | 298 |
| 299 cc::mojom::DisplayCompositor* InProcessContextFactory::GetDisplayCompositor() { |
| 300 NOTIMPLEMENTED(); |
| 301 return nullptr; |
| 302 } |
| 303 |
| 299 void InProcessContextFactory::SetDisplayVisible(ui::Compositor* compositor, | 304 void InProcessContextFactory::SetDisplayVisible(ui::Compositor* compositor, |
| 300 bool visible) { | 305 bool visible) { |
| 301 if (!per_compositor_data_.count(compositor)) | 306 if (!per_compositor_data_.count(compositor)) |
| 302 return; | 307 return; |
| 303 per_compositor_data_[compositor]->display->SetVisible(visible); | 308 per_compositor_data_[compositor]->display->SetVisible(visible); |
| 304 } | 309 } |
| 305 | 310 |
| 306 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, | 311 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, |
| 307 const gfx::Size& size) { | 312 const gfx::Size& size) { |
| 308 if (!per_compositor_data_.count(compositor)) | 313 if (!per_compositor_data_.count(compositor)) |
| (...skipping 26 matching lines...) Expand all Loading... |
| 335 data->surface_handle = tracker->AddSurfaceForNativeWidget(widget); | 340 data->surface_handle = tracker->AddSurfaceForNativeWidget(widget); |
| 336 #endif | 341 #endif |
| 337 } | 342 } |
| 338 | 343 |
| 339 PerCompositorData* return_ptr = data.get(); | 344 PerCompositorData* return_ptr = data.get(); |
| 340 per_compositor_data_[compositor] = std::move(data); | 345 per_compositor_data_[compositor] = std::move(data); |
| 341 return return_ptr; | 346 return return_ptr; |
| 342 } | 347 } |
| 343 | 348 |
| 344 } // namespace ui | 349 } // namespace ui |
| OLD | NEW |