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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 } | 248 } |
249 | 249 |
250 uint32_t InProcessContextFactory::AllocateSurfaceClientId() { | 250 uint32_t InProcessContextFactory::AllocateSurfaceClientId() { |
251 return next_surface_client_id_++; | 251 return next_surface_client_id_++; |
252 } | 252 } |
253 | 253 |
254 cc::SurfaceManager* InProcessContextFactory::GetSurfaceManager() { | 254 cc::SurfaceManager* InProcessContextFactory::GetSurfaceManager() { |
255 return surface_manager_; | 255 return surface_manager_; |
256 } | 256 } |
257 | 257 |
| 258 void InProcessContextFactory::SetDisplayVisible(ui::Compositor* compositor, |
| 259 bool visible) { |
| 260 if (!per_compositor_data_.count(compositor)) |
| 261 return; |
| 262 per_compositor_data_[compositor]->SetVisible(visible); |
| 263 } |
| 264 |
258 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, | 265 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, |
259 const gfx::Size& size) { | 266 const gfx::Size& size) { |
260 if (!per_compositor_data_.count(compositor)) | 267 if (!per_compositor_data_.count(compositor)) |
261 return; | 268 return; |
262 per_compositor_data_[compositor]->Resize(size); | 269 per_compositor_data_[compositor]->Resize(size); |
263 } | 270 } |
264 | 271 |
265 void InProcessContextFactory::AddObserver(ContextFactoryObserver* observer) { | 272 void InProcessContextFactory::AddObserver(ContextFactoryObserver* observer) { |
266 observer_list_.AddObserver(observer); | 273 observer_list_.AddObserver(observer); |
267 } | 274 } |
268 | 275 |
269 void InProcessContextFactory::RemoveObserver(ContextFactoryObserver* observer) { | 276 void InProcessContextFactory::RemoveObserver(ContextFactoryObserver* observer) { |
270 observer_list_.RemoveObserver(observer); | 277 observer_list_.RemoveObserver(observer); |
271 } | 278 } |
272 | 279 |
273 } // namespace ui | 280 } // namespace ui |
OLD | NEW |