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

Unified Diff: cc/animation/animation_player.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/animation/animation_player.h ('k') | cc/animation/animation_registrar.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/animation_player.cc
diff --git a/cc/animation/animation_player.cc b/cc/animation/animation_player.cc
index 77a7c21ec04dd15db9d8ce39995a51d5b90c5373..a609c25eac025b4c1b83c84f0d4e584a74cd0201 100644
--- a/cc/animation/animation_player.cc
+++ b/cc/animation/animation_player.cc
@@ -118,7 +118,7 @@ void AnimationPlayer::UnbindElementAnimations() {
DCHECK(animations_.empty());
}
-void AnimationPlayer::AddAnimation(scoped_ptr<Animation> animation) {
+void AnimationPlayer::AddAnimation(std::unique_ptr<Animation> animation) {
DCHECK(animation->target_property() != TargetProperty::SCROLL_OFFSET ||
(animation_host_ && animation_host_->SupportsScrollAnimations()));
@@ -144,11 +144,11 @@ void AnimationPlayer::RemoveAnimation(int animation_id) {
animation_id);
SetNeedsCommit();
} else {
- auto animations_to_remove =
- std::remove_if(animations_.begin(), animations_.end(),
- [animation_id](const scoped_ptr<Animation>& animation) {
- return animation->id() == animation_id;
- });
+ auto animations_to_remove = std::remove_if(
+ animations_.begin(), animations_.end(),
+ [animation_id](const std::unique_ptr<Animation>& animation) {
+ return animation->id() == animation_id;
+ });
animations_.erase(animations_to_remove, animations_.end());
}
}
@@ -169,7 +169,7 @@ void AnimationPlayer::AbortAnimations(TargetProperty::Type target_property,
} else {
auto animations_to_remove = std::remove_if(
animations_.begin(), animations_.end(),
- [target_property](const scoped_ptr<Animation>& animation) {
+ [target_property](const std::unique_ptr<Animation>& animation) {
return animation->target_property() == target_property;
});
animations_.erase(animations_to_remove, animations_.end());
@@ -216,7 +216,7 @@ void AnimationPlayer::NotifyAnimationTakeover(
base::TimeTicks monotonic_time,
TargetProperty::Type target_property,
double animation_start_time,
- scoped_ptr<AnimationCurve> curve) {
+ std::unique_ptr<AnimationCurve> curve) {
if (layer_animation_delegate_) {
DCHECK(curve);
layer_animation_delegate_->NotifyAnimationTakeover(
« no previous file with comments | « cc/animation/animation_player.h ('k') | cc/animation/animation_registrar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698