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

Side by Side Diff: views/animation/bounds_animator.cc

Issue 6250141: Sidebar mini tabs UI (views version).... Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/animation/bounds_animator.h ('k') | views/animation/bounds_animator_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_->GetMirroredXWithWidthInView( 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_) {
244 // Notify here rather than from AnimationXXX to avoid deleting the animation 244 if (IsAnimating()) {
245 // while the animaion is calling us. 245 observer_->OnBoundsAnimatorProgressed(this);
246 observer_->OnBoundsAnimatorDone(this); 246 } else {
247 // Notify here rather than from AnimationXXX to avoid deleting
248 // the animation while the animaion is calling us.
249 observer_->OnBoundsAnimatorDone(this);
250 }
247 } 251 }
248 } 252 }
249 253
250 void BoundsAnimator::AnimationContainerEmpty(AnimationContainer* container) { 254 void BoundsAnimator::AnimationContainerEmpty(AnimationContainer* container) {
251 } 255 }
252 256
253 } // namespace views 257 } // namespace views
OLDNEW
« no previous file with comments | « views/animation/bounds_animator.h ('k') | views/animation/bounds_animator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698