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

Side by Side Diff: cc/test/animation_timelines_test_common.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/test/animation_timelines_test_common.h ('k') | cc/test/cc_test_suite.h » ('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 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 "cc/test/animation_timelines_test_common.h" 5 #include "cc/test/animation_timelines_test_common.h"
6 6
7 #include "base/memory/ptr_util.h"
7 #include "cc/animation/animation_events.h" 8 #include "cc/animation/animation_events.h"
8 #include "cc/animation/animation_id_provider.h" 9 #include "cc/animation/animation_id_provider.h"
9 #include "cc/animation/animation_player.h" 10 #include "cc/animation/animation_player.h"
10 #include "cc/animation/animation_registrar.h" 11 #include "cc/animation/animation_registrar.h"
11 #include "cc/animation/animation_timeline.h" 12 #include "cc/animation/animation_timeline.h"
12 #include "cc/animation/element_animations.h" 13 #include "cc/animation/element_animations.h"
13 #include "cc/output/filter_operation.h" 14 #include "cc/output/filter_operation.h"
14 #include "cc/output/filter_operations.h" 15 #include "cc/output/filter_operations.h"
15 #include "ui/gfx/transform.h" 16 #include "ui/gfx/transform.h"
16 17
17 namespace cc { 18 namespace cc {
18 19
19 scoped_ptr<TestLayer> TestLayer::Create() { 20 std::unique_ptr<TestLayer> TestLayer::Create() {
20 return make_scoped_ptr(new TestLayer()); 21 return base::WrapUnique(new TestLayer());
21 } 22 }
22 23
23 TestLayer::TestLayer() { 24 TestLayer::TestLayer() {
24 ClearMutatedProperties(); 25 ClearMutatedProperties();
25 } 26 }
26 27
27 void TestLayer::ClearMutatedProperties() { 28 void TestLayer::ClearMutatedProperties() {
28 transform_x_ = 0; 29 transform_x_ = 0;
29 transform_y_ = 0; 30 transform_y_ = 0;
30 31
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 void AnimationTimelinesTest::ReleaseRefPtrs() { 228 void AnimationTimelinesTest::ReleaseRefPtrs() {
228 player_ = nullptr; 229 player_ = nullptr;
229 timeline_ = nullptr; 230 timeline_ = nullptr;
230 player_impl_ = nullptr; 231 player_impl_ = nullptr;
231 timeline_impl_ = nullptr; 232 timeline_impl_ = nullptr;
232 } 233 }
233 234
234 void AnimationTimelinesTest::AnimateLayersTransferEvents( 235 void AnimationTimelinesTest::AnimateLayersTransferEvents(
235 base::TimeTicks time, 236 base::TimeTicks time,
236 unsigned expect_events) { 237 unsigned expect_events) {
237 scoped_ptr<AnimationEvents> events = 238 std::unique_ptr<AnimationEvents> events =
238 host_->animation_registrar()->CreateEvents(); 239 host_->animation_registrar()->CreateEvents();
239 240
240 host_impl_->animation_registrar()->AnimateLayers(time); 241 host_impl_->animation_registrar()->AnimateLayers(time);
241 host_impl_->animation_registrar()->UpdateAnimationState(true, events.get()); 242 host_impl_->animation_registrar()->UpdateAnimationState(true, events.get());
242 EXPECT_EQ(expect_events, events->events_.size()); 243 EXPECT_EQ(expect_events, events->events_.size());
243 244
244 host_->animation_registrar()->AnimateLayers(time); 245 host_->animation_registrar()->AnimateLayers(time);
245 host_->animation_registrar()->UpdateAnimationState(true, nullptr); 246 host_->animation_registrar()->UpdateAnimationState(true, nullptr);
246 host_->animation_registrar()->SetAnimationEvents(std::move(events)); 247 host_->animation_registrar()->SetAnimationEvents(std::move(events));
247 } 248 }
(...skipping 11 matching lines...) Expand all
259 return element_animations ? element_animations->players_list().head()->value() 260 return element_animations ? element_animations->players_list().head()->value()
260 : nullptr; 261 : nullptr;
261 } 262 }
262 263
263 int AnimationTimelinesTest::NextTestLayerId() { 264 int AnimationTimelinesTest::NextTestLayerId() {
264 next_test_layer_id_++; 265 next_test_layer_id_++;
265 return next_test_layer_id_; 266 return next_test_layer_id_;
266 } 267 }
267 268
268 } // namespace cc 269 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/animation_timelines_test_common.h ('k') | cc/test/cc_test_suite.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698