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

Unified Diff: ui/views/mus/surface_binding.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/views/mus/surface_binding.h ('k') | ui/views/mus/surface_context_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/surface_binding.cc
diff --git a/ui/views/mus/surface_binding.cc b/ui/views/mus/surface_binding.cc
index e33e3247bd7359815b4bd69d571a874b37d8ecf7..d3cf6f36f318889318f1a0bb69a4c8229b1d7432 100644
--- a/ui/views/mus/surface_binding.cc
+++ b/ui/views/mus/surface_binding.cc
@@ -12,6 +12,7 @@
#include "base/bind.h"
#include "base/lazy_instance.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/threading/thread_local.h"
#include "cc/output/compositor_frame.h"
#include "cc/output/output_surface.h"
@@ -44,7 +45,7 @@ class SurfaceBinding::PerConnectionState
static PerConnectionState* Get(mojo::Connector* connector,
mus::WindowTreeConnection* connection);
- scoped_ptr<cc::OutputSurface> CreateOutputSurface(
+ std::unique_ptr<cc::OutputSurface> CreateOutputSurface(
mus::Window* window,
mus::mojom::SurfaceType type);
@@ -93,7 +94,7 @@ SurfaceBinding::PerConnectionState* SurfaceBinding::PerConnectionState::Get(
return (*window_map)[connection];
}
-scoped_ptr<cc::OutputSurface>
+std::unique_ptr<cc::OutputSurface>
SurfaceBinding::PerConnectionState::CreateOutputSurface(
mus::Window* window,
mus::mojom::SurfaceType surface_type) {
@@ -104,7 +105,7 @@ SurfaceBinding::PerConnectionState::CreateOutputSurface(
scoped_refptr<cc::ContextProvider> context_provider(
new mus::ContextProvider(cb.PassInterface().PassHandle()));
- return make_scoped_ptr(new mus::OutputSurface(
+ return base::WrapUnique(new mus::OutputSurface(
context_provider, window->RequestSurface(surface_type)));
}
@@ -139,7 +140,7 @@ SurfaceBinding::SurfaceBinding(mojo::Connector* connector,
SurfaceBinding::~SurfaceBinding() {}
-scoped_ptr<cc::OutputSurface> SurfaceBinding::CreateOutputSurface() {
+std::unique_ptr<cc::OutputSurface> SurfaceBinding::CreateOutputSurface() {
return state_->CreateOutputSurface(window_, surface_type_);
}
« no previous file with comments | « ui/views/mus/surface_binding.h ('k') | ui/views/mus/surface_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698