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

Side by Side Diff: chromecast/graphics/osd_plane_default.cc

Issue 1875623002: Convert //chromecast from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 <memory>
6
5 #include "base/macros.h" 7 #include "base/macros.h"
6 #include "base/memory/scoped_ptr.h"
7 #include "chromecast/public/graphics_types.h" 8 #include "chromecast/public/graphics_types.h"
8 #include "chromecast/public/osd_plane.h" 9 #include "chromecast/public/osd_plane.h"
9 #include "chromecast/public/osd_plane_shlib.h" 10 #include "chromecast/public/osd_plane_shlib.h"
10 #include "chromecast/public/osd_surface.h" 11 #include "chromecast/public/osd_surface.h"
11 12
12 namespace chromecast { 13 namespace chromecast {
13 namespace { 14 namespace {
14 15
15 // Default no-op OsdSurface implementation 16 // Default no-op OsdSurface implementation
16 class OsdSurfaceDefault : public OsdSurface { 17 class OsdSurfaceDefault : public OsdSurface {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 53 }
53 OsdSurface* GetBackBuffer() override { 54 OsdSurface* GetBackBuffer() override {
54 if (!back_buffer_) 55 if (!back_buffer_)
55 back_buffer_.reset(new OsdSurfaceDefault(size_)); 56 back_buffer_.reset(new OsdSurfaceDefault(size_));
56 return back_buffer_.get(); 57 return back_buffer_.get();
57 } 58 }
58 59
59 void Flip() override {} 60 void Flip() override {}
60 61
61 private: 62 private:
62 scoped_ptr<OsdSurface> back_buffer_; 63 std::unique_ptr<OsdSurface> back_buffer_;
63 Size size_; 64 Size size_;
64 65
65 DISALLOW_COPY_AND_ASSIGN(OsdPlaneDefault); 66 DISALLOW_COPY_AND_ASSIGN(OsdPlaneDefault);
66 }; 67 };
67 68
68 } // namespace 69 } // namespace
69 70
70 OsdPlane* OsdPlaneShlib::Create(const std::vector<std::string>& argv) { 71 OsdPlane* OsdPlaneShlib::Create(const std::vector<std::string>& argv) {
71 return new OsdPlaneDefault; 72 return new OsdPlaneDefault;
72 } 73 }
73 74
74 } // namespace chromecast 75 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/crash/linux/synchronized_minidump_manager_unittest.cc ('k') | chromecast/media/audio/cast_audio_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698