| 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 "app/slide_animation.h" | 7 #include "app/slide_animation.h" |
| 8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "views/view.h" | 9 #include "views/view.h" |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 data_.begin()->second.animation->Stop(); | 119 data_.begin()->second.animation->Stop(); |
| 120 | 120 |
| 121 // Invoke AnimationContainerProgressed to force a repaint and notify delegate. | 121 // Invoke AnimationContainerProgressed to force a repaint and notify delegate. |
| 122 AnimationContainerProgressed(container_.get()); | 122 AnimationContainerProgressed(container_.get()); |
| 123 } | 123 } |
| 124 | 124 |
| 125 SlideAnimation* BoundsAnimator::CreateAnimation() { | 125 SlideAnimation* BoundsAnimator::CreateAnimation() { |
| 126 SlideAnimation* animation = new SlideAnimation(this); | 126 SlideAnimation* animation = new SlideAnimation(this); |
| 127 animation->SetContainer(container_.get()); | 127 animation->SetContainer(container_.get()); |
| 128 animation->SetSlideDuration(kAnimationDuration); | 128 animation->SetSlideDuration(kAnimationDuration); |
| 129 animation->SetTweenType(SlideAnimation::EASE_OUT); | 129 animation->SetTweenType(Tween::EASE_OUT); |
| 130 return animation; | 130 return animation; |
| 131 } | 131 } |
| 132 | 132 |
| 133 void BoundsAnimator::RemoveFromMaps(View* view) { | 133 void BoundsAnimator::RemoveFromMaps(View* view) { |
| 134 DCHECK(data_.count(view) > 0); | 134 DCHECK(data_.count(view) > 0); |
| 135 DCHECK(animation_to_view_.count(data_[view].animation) > 0); | 135 DCHECK(animation_to_view_.count(data_[view].animation) > 0); |
| 136 | 136 |
| 137 animation_to_view_.erase(data_[view].animation); | 137 animation_to_view_.erase(data_[view].animation); |
| 138 data_.erase(view); | 138 data_.erase(view); |
| 139 } | 139 } |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // Notify here rather than from AnimationXXX to avoid deleting the animation | 238 // Notify here rather than from AnimationXXX to avoid deleting the animation |
| 239 // while the animaion is calling us. | 239 // while the animaion is calling us. |
| 240 observer_->OnBoundsAnimatorDone(this); | 240 observer_->OnBoundsAnimatorDone(this); |
| 241 } | 241 } |
| 242 } | 242 } |
| 243 | 243 |
| 244 void BoundsAnimator::AnimationContainerEmpty(AnimationContainer* container) { | 244 void BoundsAnimator::AnimationContainerEmpty(AnimationContainer* container) { |
| 245 } | 245 } |
| 246 | 246 |
| 247 } // namespace views | 247 } // namespace views |
| OLD | NEW |