| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 } | 227 } |
| 228 | 228 |
| 229 void BoundsAnimator::AnimationCanceled(const Animation* animation) { | 229 void BoundsAnimator::AnimationCanceled(const Animation* animation) { |
| 230 AnimationEndedOrCanceled(animation, ANIMATION_CANCELED); | 230 AnimationEndedOrCanceled(animation, ANIMATION_CANCELED); |
| 231 } | 231 } |
| 232 | 232 |
| 233 void BoundsAnimator::AnimationContainerProgressed( | 233 void BoundsAnimator::AnimationContainerProgressed( |
| 234 AnimationContainer* container) { | 234 AnimationContainer* container) { |
| 235 if (!repaint_bounds_.IsEmpty()) { | 235 if (!repaint_bounds_.IsEmpty()) { |
| 236 // Adjust for rtl. | 236 // Adjust for rtl. |
| 237 repaint_bounds_.set_x(parent_->MirroredXWithWidthInsideView( | 237 repaint_bounds_.set_x(parent_->GetMirroredXWithWidthInView( |
| 238 repaint_bounds_.x(), repaint_bounds_.width())); | 238 repaint_bounds_.x(), repaint_bounds_.width())); |
| 239 parent_->SchedulePaint(repaint_bounds_, false); | 239 parent_->SchedulePaint(repaint_bounds_, false); |
| 240 repaint_bounds_.SetRect(0, 0, 0, 0); | 240 repaint_bounds_.SetRect(0, 0, 0, 0); |
| 241 } | 241 } |
| 242 | 242 |
| 243 if (observer_ && !IsAnimating()) { | 243 if (observer_ && !IsAnimating()) { |
| 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 |