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

Unified Diff: ui/compositor/layer_animator.cc

Issue 16136005: Update remaining files to use WeakPtr<T>::get() instead of "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
« cc/resources/video_resource_updater.cc ('K') | « ui/compositor/layer_animator.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_animator.cc
diff --git a/ui/compositor/layer_animator.cc b/ui/compositor/layer_animator.cc
index f5d9b4cf5780e9556afc330ec237c5394b030b3c..4b1e9812232f999f0b2a50142c47e3edb804b0a8 100644
--- a/ui/compositor/layer_animator.cc
+++ b/ui/compositor/layer_animator.cc
@@ -601,15 +601,16 @@ void LayerAnimator::RemoveAllAnimationsWithACommonProperty(
sequences.push_back((*queue_iter)->AsWeakPtr());
for (size_t i = 0; i < sequences.size(); ++i) {
- if (!sequences[i] || !HasAnimation(sequences[i]))
+ if (!sequences[i].get() || !HasAnimation(sequences[i].get()))
continue;
if (sequences[i]->HasConflictingProperty(sequence->properties())) {
- scoped_ptr<LayerAnimationSequence> removed(RemoveAnimation(sequences[i]));
+ scoped_ptr<LayerAnimationSequence> removed(
+ RemoveAnimation(sequences[i].get()));
if (abort)
sequences[i]->Abort(delegate());
else
- ProgressAnimationToEnd(sequences[i]);
+ ProgressAnimationToEnd(sequences[i].get());
}
}
}
@@ -621,16 +622,16 @@ void LayerAnimator::ImmediatelySetNewTarget(LayerAnimationSequence* sequence) {
const bool abort = false;
RemoveAllAnimationsWithACommonProperty(sequence, abort);
- if (!weak_sequence_ptr)
+ if (!weak_sequence_ptr.get())
return;
LayerAnimationSequence* removed = RemoveAnimation(sequence);
DCHECK(removed == NULL || removed == sequence);
- if (!weak_sequence_ptr)
+ if (!weak_sequence_ptr.get())
return;
ProgressAnimationToEnd(sequence);
- if (!weak_sequence_ptr)
+ if (!weak_sequence_ptr.get())
return;
delete sequence;
@@ -644,11 +645,11 @@ void LayerAnimator::ImmediatelyAnimateToNewTarget(
const bool abort = true;
RemoveAllAnimationsWithACommonProperty(sequence, abort);
- if (!weak_sequence_ptr)
+ if (!weak_sequence_ptr.get())
return;
AddToQueueIfNotPresent(sequence);
- if (!weak_sequence_ptr)
+ if (!weak_sequence_ptr.get())
return;
StartSequenceImmediately(sequence);
@@ -672,7 +673,7 @@ void LayerAnimator::ReplaceQueuedAnimations(LayerAnimationSequence* sequence) {
// animation_queue_.size() - i is always decreasing and we are always making
// progress towards the loop terminating.
for (size_t i = 0; i < animation_queue_.size();) {
- if (!weak_sequence_ptr)
+ if (!weak_sequence_ptr.get())
break;
PurgeDeletedAnimations();
@@ -719,7 +720,7 @@ void LayerAnimator::ProcessQueue() {
sequences.push_back((*queue_iter)->AsWeakPtr());
for (size_t i = 0; i < sequences.size(); ++i) {
- if (!sequences[i] || !HasAnimation(sequences[i]))
+ if (!sequences[i].get() || !HasAnimation(sequences[i].get()))
continue;
if (!sequences[i]->HasConflictingProperty(animated)) {
« cc/resources/video_resource_updater.cc ('K') | « ui/compositor/layer_animator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698