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

Unified Diff: ui/ozone/platform/cast/surface_factory_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/cast/surface_factory_cast.h ('k') | ui/ozone/platform/cast/surface_ozone_egl_cast.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/cast/surface_factory_cast.cc
diff --git a/ui/ozone/platform/cast/surface_factory_cast.cc b/ui/ozone/platform/cast/surface_factory_cast.cc
index 72fa4e67901b0709cb81c2d3009b4e81d2ad6606..09ea148354ca3118e92abe841bd5e59a8ae22318 100644
--- a/ui/ozone/platform/cast/surface_factory_cast.cc
+++ b/ui/ozone/platform/cast/surface_factory_cast.cc
@@ -4,12 +4,14 @@
#include "ui/ozone/platform/cast/surface_factory_cast.h"
-#include <dlfcn.h>
#include <EGL/egl.h>
+#include <dlfcn.h>
+
#include <utility>
#include "base/callback_helpers.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "chromecast/public/cast_egl_platform.h"
#include "chromecast/public/graphics_types.h"
#include "third_party/skia/include/core/SkSurface.h"
@@ -57,7 +59,7 @@ class DummySurface : public SurfaceOzoneCanvas {
void PresentCanvas(const gfx::Rect& damage) override {}
- scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override {
+ std::unique_ptr<gfx::VSyncProvider> CreateVSyncProvider() override {
return nullptr;
}
@@ -71,7 +73,8 @@ class DummySurface : public SurfaceOzoneCanvas {
SurfaceFactoryCast::SurfaceFactoryCast() : SurfaceFactoryCast(nullptr) {}
-SurfaceFactoryCast::SurfaceFactoryCast(scoped_ptr<CastEglPlatform> egl_platform)
+SurfaceFactoryCast::SurfaceFactoryCast(
+ std::unique_ptr<CastEglPlatform> egl_platform)
: state_(kUninitialized),
display_type_(0),
have_display_type_(false),
@@ -155,12 +158,12 @@ void SurfaceFactoryCast::OnOverlayScheduled(const gfx::Rect& display_bounds) {
overlay_bounds_ = display_bounds;
}
-scoped_ptr<SurfaceOzoneCanvas> SurfaceFactoryCast::CreateCanvasForWidget(
+std::unique_ptr<SurfaceOzoneCanvas> SurfaceFactoryCast::CreateCanvasForWidget(
gfx::AcceleratedWidget widget) {
// Software canvas support only in headless mode
if (egl_platform_)
return nullptr;
- return make_scoped_ptr<SurfaceOzoneCanvas>(new DummySurface());
+ return base::WrapUnique<SurfaceOzoneCanvas>(new DummySurface());
}
intptr_t SurfaceFactoryCast::GetNativeDisplay() {
@@ -225,11 +228,11 @@ void SurfaceFactoryCast::DestroyDisplayTypeAndWindow() {
}
}
-scoped_ptr<SurfaceOzoneEGL> SurfaceFactoryCast::CreateEGLSurfaceForWidget(
+std::unique_ptr<SurfaceOzoneEGL> SurfaceFactoryCast::CreateEGLSurfaceForWidget(
gfx::AcceleratedWidget widget) {
new_display_size_ = gfx::Size(widget >> 16, widget & 0xFFFF);
new_display_size_.SetToMax(GetMinDisplaySize());
- return make_scoped_ptr<SurfaceOzoneEGL>(new SurfaceOzoneEglCast(this));
+ return base::WrapUnique<SurfaceOzoneEGL>(new SurfaceOzoneEglCast(this));
}
void SurfaceFactoryCast::ChildDestroyed() {
« no previous file with comments | « ui/ozone/platform/cast/surface_factory_cast.h ('k') | ui/ozone/platform/cast/surface_ozone_egl_cast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698