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

Side by Side Diff: ash/mus/stub_context_factory.cc

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 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
« no previous file with comments | « ash/mus/stub_context_factory.h ('k') | ash/mus/sysui_application.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ash/mus/stub_context_factory.h" 5 #include "ash/mus/stub_context_factory.h"
6 6
7 #include "base/memory/ptr_util.h"
7 #include "cc/output/context_provider.h" 8 #include "cc/output/context_provider.h"
8 #include "cc/raster/single_thread_task_graph_runner.h" 9 #include "cc/raster/single_thread_task_graph_runner.h"
9 #include "cc/surfaces/surface_id_allocator.h" 10 #include "cc/surfaces/surface_id_allocator.h"
10 #include "third_party/khronos/GLES2/gl2.h" 11 #include "third_party/khronos/GLES2/gl2.h"
11 #include "ui/compositor/reflector.h" 12 #include "ui/compositor/reflector.h"
12 13
13 namespace ash { 14 namespace ash {
14 namespace sysui { 15 namespace sysui {
15 16
16 namespace { 17 namespace {
(...skipping 10 matching lines...) Expand all
27 28
28 StubContextFactory::StubContextFactory() 29 StubContextFactory::StubContextFactory()
29 : next_surface_id_namespace_(1u), 30 : next_surface_id_namespace_(1u),
30 task_graph_runner_(new StubTaskGraphRunner) {} 31 task_graph_runner_(new StubTaskGraphRunner) {}
31 32
32 StubContextFactory::~StubContextFactory() {} 33 StubContextFactory::~StubContextFactory() {}
33 34
34 void StubContextFactory::CreateOutputSurface( 35 void StubContextFactory::CreateOutputSurface(
35 base::WeakPtr<ui::Compositor> compositor) {} 36 base::WeakPtr<ui::Compositor> compositor) {}
36 37
37 scoped_ptr<ui::Reflector> StubContextFactory::CreateReflector( 38 std::unique_ptr<ui::Reflector> StubContextFactory::CreateReflector(
38 ui::Compositor* mirrored_compositor, 39 ui::Compositor* mirrored_compositor,
39 ui::Layer* mirroring_layer) { 40 ui::Layer* mirroring_layer) {
40 return nullptr; 41 return nullptr;
41 } 42 }
42 43
43 void StubContextFactory::RemoveReflector(ui::Reflector* reflector) {} 44 void StubContextFactory::RemoveReflector(ui::Reflector* reflector) {}
44 45
45 scoped_refptr<cc::ContextProvider> 46 scoped_refptr<cc::ContextProvider>
46 StubContextFactory::SharedMainThreadContextProvider() { 47 StubContextFactory::SharedMainThreadContextProvider() {
47 return nullptr; 48 return nullptr;
(...skipping 15 matching lines...) Expand all
63 } 64 }
64 65
65 gpu::GpuMemoryBufferManager* StubContextFactory::GetGpuMemoryBufferManager() { 66 gpu::GpuMemoryBufferManager* StubContextFactory::GetGpuMemoryBufferManager() {
66 return nullptr; 67 return nullptr;
67 } 68 }
68 69
69 cc::TaskGraphRunner* StubContextFactory::GetTaskGraphRunner() { 70 cc::TaskGraphRunner* StubContextFactory::GetTaskGraphRunner() {
70 return task_graph_runner_.get(); 71 return task_graph_runner_.get();
71 } 72 }
72 73
73 scoped_ptr<cc::SurfaceIdAllocator> 74 std::unique_ptr<cc::SurfaceIdAllocator>
74 StubContextFactory::CreateSurfaceIdAllocator() { 75 StubContextFactory::CreateSurfaceIdAllocator() {
75 return make_scoped_ptr( 76 return base::WrapUnique(
76 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); 77 new cc::SurfaceIdAllocator(next_surface_id_namespace_++));
77 } 78 }
78 79
79 void StubContextFactory::ResizeDisplay(ui::Compositor* compositor, 80 void StubContextFactory::ResizeDisplay(ui::Compositor* compositor,
80 const gfx::Size& size) {} 81 const gfx::Size& size) {}
81 82
82 } // namespace sysui 83 } // namespace sysui
83 } // namespace ash 84 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/stub_context_factory.h ('k') | ash/mus/sysui_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698