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

Unified Diff: ui/compositor/layer_animation_sequence.cc

Issue 2835983003: Remove WeakPtrFactory from LayerAnimationSequence (Closed)
Patch Set: Created 3 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/compositor/layer_animation_sequence.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_animation_sequence.cc
diff --git a/ui/compositor/layer_animation_sequence.cc b/ui/compositor/layer_animation_sequence.cc
index d1739e7ee06ee096d2714642848e9fc7cc31ae02..f13db19d1d12a83de37b65cc364c03e0f9e12fd8 100644
--- a/ui/compositor/layer_animation_sequence.cc
+++ b/ui/compositor/layer_animation_sequence.cc
@@ -22,8 +22,7 @@ LayerAnimationSequence::LayerAnimationSequence()
waiting_for_group_start_(false),
animation_group_id_(0),
last_progressed_fraction_(0.0),
- animation_metrics_reporter_(nullptr),
- weak_ptr_factory_(this) {}
+ animation_metrics_reporter_(nullptr) {}
LayerAnimationSequence::LayerAnimationSequence(
std::unique_ptr<LayerAnimationElement> element)
@@ -33,8 +32,7 @@ LayerAnimationSequence::LayerAnimationSequence(
waiting_for_group_start_(false),
animation_group_id_(0),
last_progressed_fraction_(0.0),
- animation_metrics_reporter_(nullptr),
- weak_ptr_factory_(this) {
+ animation_metrics_reporter_(nullptr) {
AddElement(std::move(element));
}
@@ -90,7 +88,7 @@ void LayerAnimationSequence::Progress(base::TimeTicks now,
animation_group_id_ = cc::AnimationIdProvider::NextGroupId();
elements_[current_index]->Start(delegate, animation_group_id_);
}
- base::WeakPtr<LayerAnimationSequence> alive(weak_ptr_factory_.GetWeakPtr());
+ base::WeakPtr<LayerAnimationSequence> alive(AsWeakPtr());
if (elements_[current_index]->Progress(now, delegate))
redraw_required = true;
if (!alive)
« no previous file with comments | « ui/compositor/layer_animation_sequence.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698