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

Side by Side Diff: cc/layers/layer_position_constraint_unittest.cc

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 unified diff | Download patch
« no previous file with comments | « cc/layers/layer_perftest.cc ('k') | cc/layers/layer_proto_converter_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/layers/layer_position_constraint.h" 5 #include "cc/layers/layer_position_constraint.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/layers/layer_impl.h" 10 #include "cc/layers/layer_impl.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 root_impl_(nullptr), 68 root_impl_(nullptr),
69 inner_viewport_container_layer_impl_(nullptr), 69 inner_viewport_container_layer_impl_(nullptr),
70 scroll_layer_impl_(nullptr), 70 scroll_layer_impl_(nullptr),
71 outer_viewport_container_layer_impl_(nullptr), 71 outer_viewport_container_layer_impl_(nullptr),
72 child_transform_layer_impl_(nullptr), 72 child_transform_layer_impl_(nullptr),
73 child_impl_(nullptr), 73 child_impl_(nullptr),
74 grand_child_impl_(nullptr), 74 grand_child_impl_(nullptr),
75 great_grand_child_impl_(nullptr) { 75 great_grand_child_impl_(nullptr) {
76 layer_tree_host_->InitializeForTesting( 76 layer_tree_host_->InitializeForTesting(
77 TaskRunnerProvider::Create(nullptr, nullptr), 77 TaskRunnerProvider::Create(nullptr, nullptr),
78 scoped_ptr<Proxy>(new FakeProxy), nullptr); 78 std::unique_ptr<Proxy>(new FakeProxy), nullptr);
79 CreateTreeForTest(); 79 CreateTreeForTest();
80 fixed_to_top_left_.set_is_fixed_position(true); 80 fixed_to_top_left_.set_is_fixed_position(true);
81 fixed_to_bottom_right_.set_is_fixed_position(true); 81 fixed_to_bottom_right_.set_is_fixed_position(true);
82 fixed_to_bottom_right_.set_is_fixed_to_right_edge(true); 82 fixed_to_bottom_right_.set_is_fixed_to_right_edge(true);
83 fixed_to_bottom_right_.set_is_fixed_to_bottom_edge(true); 83 fixed_to_bottom_right_.set_is_fixed_to_bottom_edge(true);
84 } 84 }
85 85
86 void CreateTreeForTest() { 86 void CreateTreeForTest() {
87 // scroll_layer_ is the inner viewport scroll layer and child_ is the outer 87 // scroll_layer_ is the inner viewport scroll layer and child_ is the outer
88 // viewport scroll layer. 88 // viewport scroll layer.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 child_transform_layer_impl_ = 161 child_transform_layer_impl_ =
162 outer_viewport_container_layer_impl_->children()[0]; 162 outer_viewport_container_layer_impl_->children()[0];
163 child_impl_ = child_transform_layer_impl_->children()[0]; 163 child_impl_ = child_transform_layer_impl_->children()[0];
164 grand_child_impl_ = child_impl_->children()[0]; 164 grand_child_impl_ = child_impl_->children()[0];
165 great_grand_child_impl_ = grand_child_impl_->children()[0]; 165 great_grand_child_impl_ = grand_child_impl_->children()[0];
166 } 166 }
167 167
168 protected: 168 protected:
169 FakeLayerTreeHostClient fake_client_; 169 FakeLayerTreeHostClient fake_client_;
170 TestTaskGraphRunner task_graph_runner_; 170 TestTaskGraphRunner task_graph_runner_;
171 scoped_ptr<FakeLayerTreeHost> layer_tree_host_; 171 std::unique_ptr<FakeLayerTreeHost> layer_tree_host_;
172 scoped_refptr<Layer> root_; 172 scoped_refptr<Layer> root_;
173 scoped_refptr<Layer> inner_viewport_container_layer_; 173 scoped_refptr<Layer> inner_viewport_container_layer_;
174 scoped_refptr<Layer> scroll_layer_; 174 scoped_refptr<Layer> scroll_layer_;
175 scoped_refptr<Layer> outer_viewport_container_layer_; 175 scoped_refptr<Layer> outer_viewport_container_layer_;
176 scoped_refptr<Layer> child_transform_layer_; 176 scoped_refptr<Layer> child_transform_layer_;
177 scoped_refptr<Layer> child_; 177 scoped_refptr<Layer> child_;
178 scoped_refptr<Layer> grand_child_; 178 scoped_refptr<Layer> grand_child_;
179 scoped_refptr<Layer> great_grand_child_; 179 scoped_refptr<Layer> great_grand_child_;
180 LayerImpl* root_impl_; 180 LayerImpl* root_impl_;
181 LayerImpl* inner_viewport_container_layer_impl_; 181 LayerImpl* inner_viewport_container_layer_impl_;
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 VerifySerializeAndDeserializeProto(true, false, true); 1158 VerifySerializeAndDeserializeProto(true, false, true);
1159 VerifySerializeAndDeserializeProto(true, false, false); 1159 VerifySerializeAndDeserializeProto(true, false, false);
1160 VerifySerializeAndDeserializeProto(false, true, true); 1160 VerifySerializeAndDeserializeProto(false, true, true);
1161 VerifySerializeAndDeserializeProto(false, true, false); 1161 VerifySerializeAndDeserializeProto(false, true, false);
1162 VerifySerializeAndDeserializeProto(false, false, true); 1162 VerifySerializeAndDeserializeProto(false, false, true);
1163 VerifySerializeAndDeserializeProto(false, false, false); 1163 VerifySerializeAndDeserializeProto(false, false, false);
1164 } 1164 }
1165 1165
1166 } // namespace 1166 } // namespace
1167 } // namespace cc 1167 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_perftest.cc ('k') | cc/layers/layer_proto_converter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698