| OLD | NEW | 
|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "views/animation/bounds_animator.h" | 5 #include "views/animation/bounds_animator.h" | 
| 6 | 6 | 
| 7 #include "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" | 
| 8 #include "ui/base/animation/animation_container.h" | 8 #include "ui/base/animation/animation_container.h" | 
| 9 #include "ui/base/animation/slide_animation.h" | 9 #include "ui/base/animation/slide_animation.h" | 
| 10 #include "views/view.h" | 10 #include "views/view.h" | 
| (...skipping 21 matching lines...) Expand all  Loading... | 
| 32   container_->set_observer(NULL); | 32   container_->set_observer(NULL); | 
| 33 | 33 | 
| 34   // Delete all the animations, but don't remove any child views. We assume the | 34   // Delete all the animations, but don't remove any child views. We assume the | 
| 35   // view owns us and is going to be deleted anyway. | 35   // view owns us and is going to be deleted anyway. | 
| 36   for (ViewToDataMap::iterator i = data_.begin(); i != data_.end(); ++i) | 36   for (ViewToDataMap::iterator i = data_.begin(); i != data_.end(); ++i) | 
| 37     CleanupData(false, &(i->second), i->first); | 37     CleanupData(false, &(i->second), i->first); | 
| 38 } | 38 } | 
| 39 | 39 | 
| 40 void BoundsAnimator::AnimateViewTo(View* view, const gfx::Rect& target) { | 40 void BoundsAnimator::AnimateViewTo(View* view, const gfx::Rect& target) { | 
| 41   DCHECK(view); | 41   DCHECK(view); | 
| 42   DCHECK_EQ(view->GetParent(), parent_); | 42   DCHECK_EQ(view->parent(), parent_); | 
| 43 | 43 | 
| 44   Data existing_data; | 44   Data existing_data; | 
| 45 | 45 | 
| 46   if (IsAnimating(view)) { | 46   if (IsAnimating(view)) { | 
| 47     // Don't immediatly delete the animation, that might trigger a callback from | 47     // Don't immediatly delete the animation, that might trigger a callback from | 
| 48     // the animationcontainer. | 48     // the animationcontainer. | 
| 49     existing_data = data_[view]; | 49     existing_data = data_[view]; | 
| 50 | 50 | 
| 51     RemoveFromMaps(view); | 51     RemoveFromMaps(view); | 
| 52   } | 52   } | 
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 244     // Notify here rather than from AnimationXXX to avoid deleting the animation | 244     // Notify here rather than from AnimationXXX to avoid deleting the animation | 
| 245     // while the animaion is calling us. | 245     // while the animaion is calling us. | 
| 246     observer_->OnBoundsAnimatorDone(this); | 246     observer_->OnBoundsAnimatorDone(this); | 
| 247   } | 247   } | 
| 248 } | 248 } | 
| 249 | 249 | 
| 250 void BoundsAnimator::AnimationContainerEmpty(AnimationContainer* container) { | 250 void BoundsAnimator::AnimationContainerEmpty(AnimationContainer* container) { | 
| 251 } | 251 } | 
| 252 | 252 | 
| 253 }  // namespace views | 253 }  // namespace views | 
| OLD | NEW | 
|---|