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

Side by Side Diff: ui/views/mus/surface_context_factory.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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 | « ui/views/mus/surface_context_factory.h ('k') | ui/views/mus/window_manager_connection.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/views/mus/surface_context_factory.h" 5 #include "ui/views/mus/surface_context_factory.h"
6 6
7 #include "base/memory/ptr_util.h"
7 #include "cc/output/output_surface.h" 8 #include "cc/output/output_surface.h"
8 #include "cc/resources/shared_bitmap_manager.h" 9 #include "cc/resources/shared_bitmap_manager.h"
9 #include "cc/surfaces/surface_id_allocator.h" 10 #include "cc/surfaces/surface_id_allocator.h"
10 #include "components/mus/public/cpp/window.h" 11 #include "components/mus/public/cpp/window.h"
11 #include "mojo/shell/public/interfaces/connector.mojom.h" 12 #include "mojo/shell/public/interfaces/connector.mojom.h"
12 #include "ui/compositor/reflector.h" 13 #include "ui/compositor/reflector.h"
13 #include "ui/gl/gl_bindings.h" 14 #include "ui/gl/gl_bindings.h"
14 15
15 namespace views { 16 namespace views {
16 namespace { 17 namespace {
(...skipping 17 matching lines...) Expand all
34 next_surface_id_namespace_(1u) {} 35 next_surface_id_namespace_(1u) {}
35 36
36 SurfaceContextFactory::~SurfaceContextFactory() {} 37 SurfaceContextFactory::~SurfaceContextFactory() {}
37 38
38 void SurfaceContextFactory::CreateOutputSurface( 39 void SurfaceContextFactory::CreateOutputSurface(
39 base::WeakPtr<ui::Compositor> compositor) { 40 base::WeakPtr<ui::Compositor> compositor) {
40 // NOTIMPLEMENTED(); 41 // NOTIMPLEMENTED();
41 compositor->SetOutputSurface(surface_binding_.CreateOutputSurface()); 42 compositor->SetOutputSurface(surface_binding_.CreateOutputSurface());
42 } 43 }
43 44
44 scoped_ptr<ui::Reflector> SurfaceContextFactory::CreateReflector( 45 std::unique_ptr<ui::Reflector> SurfaceContextFactory::CreateReflector(
45 ui::Compositor* mirroed_compositor, 46 ui::Compositor* mirroed_compositor,
46 ui::Layer* mirroring_layer) { 47 ui::Layer* mirroring_layer) {
47 // NOTIMPLEMENTED(); 48 // NOTIMPLEMENTED();
48 return make_scoped_ptr(new FakeReflector); 49 return base::WrapUnique(new FakeReflector);
49 } 50 }
50 51
51 void SurfaceContextFactory::RemoveReflector(ui::Reflector* reflector) { 52 void SurfaceContextFactory::RemoveReflector(ui::Reflector* reflector) {
52 // NOTIMPLEMENTED(); 53 // NOTIMPLEMENTED();
53 } 54 }
54 55
55 scoped_refptr<cc::ContextProvider> 56 scoped_refptr<cc::ContextProvider>
56 SurfaceContextFactory::SharedMainThreadContextProvider() { 57 SurfaceContextFactory::SharedMainThreadContextProvider() {
57 // NOTIMPLEMENTED(); 58 // NOTIMPLEMENTED();
58 return nullptr; 59 return nullptr;
(...skipping 20 matching lines...) Expand all
79 80
80 gpu::GpuMemoryBufferManager* 81 gpu::GpuMemoryBufferManager*
81 SurfaceContextFactory::GetGpuMemoryBufferManager() { 82 SurfaceContextFactory::GetGpuMemoryBufferManager() {
82 return &gpu_memory_buffer_manager_; 83 return &gpu_memory_buffer_manager_;
83 } 84 }
84 85
85 cc::TaskGraphRunner* SurfaceContextFactory::GetTaskGraphRunner() { 86 cc::TaskGraphRunner* SurfaceContextFactory::GetTaskGraphRunner() {
86 return raster_thread_helper_.task_graph_runner(); 87 return raster_thread_helper_.task_graph_runner();
87 } 88 }
88 89
89 scoped_ptr<cc::SurfaceIdAllocator> 90 std::unique_ptr<cc::SurfaceIdAllocator>
90 SurfaceContextFactory::CreateSurfaceIdAllocator() { 91 SurfaceContextFactory::CreateSurfaceIdAllocator() {
91 return make_scoped_ptr( 92 return base::WrapUnique(
92 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); 93 new cc::SurfaceIdAllocator(next_surface_id_namespace_++));
93 } 94 }
94 95
95 void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor, 96 void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor,
96 const gfx::Size& size) { 97 const gfx::Size& size) {
97 // NOTIMPLEMENTED(); 98 // NOTIMPLEMENTED();
98 } 99 }
99 100
100 } // namespace views 101 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/surface_context_factory.h ('k') | ui/views/mus/window_manager_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698