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

Side by Side Diff: ui/ozone/platform/cast/overlay_manager_cast.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
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/ozone/platform/cast/overlay_manager_cast.h" 5 #include "ui/ozone/platform/cast/overlay_manager_cast.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/memory/ptr_util.h"
8 #include "ui/gfx/geometry/rect_conversions.h" 9 #include "ui/gfx/geometry/rect_conversions.h"
9 #include "ui/ozone/public/overlay_candidates_ozone.h" 10 #include "ui/ozone/public/overlay_candidates_ozone.h"
10 11
11 namespace ui { 12 namespace ui {
12 namespace { 13 namespace {
13 14
14 base::LazyInstance<OverlayManagerCast::OverlayCompositedCallback> 15 base::LazyInstance<OverlayManagerCast::OverlayCompositedCallback>
15 g_overlay_composited_callback = LAZY_INSTANCE_INITIALIZER; 16 g_overlay_composited_callback = LAZY_INSTANCE_INITIALIZER;
16 17
17 // Translates a gfx::OverlayTransform into a VideoPlane::Transform. 18 // Translates a gfx::OverlayTransform into a VideoPlane::Transform.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 71 }
71 72
72 } // namespace 73 } // namespace
73 74
74 OverlayManagerCast::OverlayManagerCast() { 75 OverlayManagerCast::OverlayManagerCast() {
75 } 76 }
76 77
77 OverlayManagerCast::~OverlayManagerCast() { 78 OverlayManagerCast::~OverlayManagerCast() {
78 } 79 }
79 80
80 scoped_ptr<OverlayCandidatesOzone> OverlayManagerCast::CreateOverlayCandidates( 81 std::unique_ptr<OverlayCandidatesOzone>
81 gfx::AcceleratedWidget w) { 82 OverlayManagerCast::CreateOverlayCandidates(gfx::AcceleratedWidget w) {
82 return make_scoped_ptr(new OverlayCandidatesCast()); 83 return base::WrapUnique(new OverlayCandidatesCast());
83 } 84 }
84 85
85 // static 86 // static
86 void OverlayManagerCast::SetOverlayCompositedCallback( 87 void OverlayManagerCast::SetOverlayCompositedCallback(
87 const OverlayCompositedCallback& cb) { 88 const OverlayCompositedCallback& cb) {
88 g_overlay_composited_callback.Get() = cb; 89 g_overlay_composited_callback.Get() = cb;
89 } 90 }
90 91
91 } // namespace ui 92 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/cast/overlay_manager_cast.h ('k') | ui/ozone/platform/cast/ozone_platform_cast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698