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

Unified Diff: cc/test/layer_test_common.h

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase 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 | « cc/test/fake_tile_manager_client.cc ('k') | cc/test/layer_test_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_test_common.h
diff --git a/cc/test/layer_test_common.h b/cc/test/layer_test_common.h
index 573ba64a75987542bf7c51f42b7c22520e4cce1e..7c1a60085f2e0d27f7521c067de2fb28813e8d79 100644
--- a/cc/test/layer_test_common.h
+++ b/cc/test/layer_test_common.h
@@ -7,9 +7,9 @@
#include <stddef.h>
+#include <memory>
#include <utility>
-#include "base/memory/scoped_ptr.h"
#include "cc/animation/animation_timeline.h"
#include "cc/quads/render_pass.h"
#include "cc/test/fake_layer_tree_host.h"
@@ -58,7 +58,7 @@ class LayerTestCommon {
template <typename T>
T* AddChildToRoot() {
- scoped_ptr<T> layer =
+ std::unique_ptr<T> layer =
T::Create(host_->host_impl()->active_tree(), layer_impl_id_++);
T* ptr = layer.get();
root_layer()->AddChild(std::move(layer));
@@ -67,7 +67,7 @@ class LayerTestCommon {
template <typename T>
T* AddChild(LayerImpl* parent) {
- scoped_ptr<T> layer =
+ std::unique_ptr<T> layer =
T::Create(host_->host_impl()->active_tree(), layer_impl_id_++);
T* ptr = layer.get();
parent->AddChild(std::move(layer));
@@ -76,7 +76,7 @@ class LayerTestCommon {
template <typename T>
T* AddReplicaLayer(LayerImpl* origin) {
- scoped_ptr<T> layer =
+ std::unique_ptr<T> layer =
T::Create(host_->host_impl()->active_tree(), layer_impl_id_++);
T* ptr = layer.get();
origin->SetReplicaLayer(std::move(layer));
@@ -85,7 +85,7 @@ class LayerTestCommon {
template <typename T, typename A>
T* AddChildToRoot(const A& a) {
- scoped_ptr<T> layer =
+ std::unique_ptr<T> layer =
T::Create(host_->host_impl()->active_tree(), layer_impl_id_++, a);
T* ptr = layer.get();
root_layer()->AddChild(std::move(layer));
@@ -94,7 +94,7 @@ class LayerTestCommon {
template <typename T, typename A, typename B>
T* AddChildToRoot(const A& a, const B& b) {
- scoped_ptr<T> layer =
+ std::unique_ptr<T> layer =
T::Create(host_->host_impl()->active_tree(), layer_impl_id_++, a, b);
T* ptr = layer.get();
root_layer()->AddChild(std::move(layer));
@@ -103,8 +103,8 @@ class LayerTestCommon {
template <typename T, typename A, typename B, typename C, typename D>
T* AddChildToRoot(const A& a, const B& b, const C& c, const D& d) {
- scoped_ptr<T> layer = T::Create(host_->host_impl()->active_tree(),
- layer_impl_id_++, a, b, c, d);
+ std::unique_ptr<T> layer = T::Create(host_->host_impl()->active_tree(),
+ layer_impl_id_++, a, b, c, d);
T* ptr = layer.get();
root_layer()->AddChild(std::move(layer));
return ptr;
@@ -121,8 +121,8 @@ class LayerTestCommon {
const C& c,
const D& d,
const E& e) {
- scoped_ptr<T> layer = T::Create(host_->host_impl()->active_tree(),
- layer_impl_id_++, a, b, c, d, e);
+ std::unique_ptr<T> layer = T::Create(host_->host_impl()->active_tree(),
+ layer_impl_id_++, a, b, c, d, e);
T* ptr = layer.get();
root_layer()->AddChild(std::move(layer));
return ptr;
@@ -164,9 +164,9 @@ class LayerTestCommon {
private:
FakeLayerTreeHostClient client_;
TestTaskGraphRunner task_graph_runner_;
- scoped_ptr<OutputSurface> output_surface_;
- scoped_ptr<FakeLayerTreeHost> host_;
- scoped_ptr<RenderPass> render_pass_;
+ std::unique_ptr<OutputSurface> output_surface_;
+ std::unique_ptr<FakeLayerTreeHost> host_;
+ std::unique_ptr<RenderPass> render_pass_;
scoped_refptr<AnimationTimeline> timeline_;
scoped_refptr<AnimationTimeline> timeline_impl_;
int layer_impl_id_;
« no previous file with comments | « cc/test/fake_tile_manager_client.cc ('k') | cc/test/layer_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698