Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: ui/compositor/test/in_process_context_factory.cc

Issue 2789753002: Convert offscreen canvas to use FrameSinkManagerHost. (Closed)
Patch Set: Lower similarity. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698