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

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

Issue 6452011: Rework tree APIs to reflect Google style and more const-correctness.... (Closed) 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/accessibility/view_accessibility.cc ('k') | views/controls/button/native_button_gtk.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 21 matching lines...) Expand all
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
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
OLDNEW
« no previous file with comments | « views/accessibility/view_accessibility.cc ('k') | views/controls/button/native_button_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698