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

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

Issue 2418983002: ui/views: convert usage of FOR_EACH_OBSERVER macro (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | ui/views/focus/focus_manager.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/animation/bounds_animator.h" 5 #include "ui/views/animation/bounds_animator.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "ui/gfx/animation/animation_container.h" 9 #include "ui/gfx/animation/animation_container.h"
10 #include "ui/gfx/animation/slide_animation.h" 10 #include "ui/gfx/animation/slide_animation.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 void BoundsAnimator::AnimationContainerProgressed( 257 void BoundsAnimator::AnimationContainerProgressed(
258 AnimationContainer* container) { 258 AnimationContainer* container) {
259 if (!repaint_bounds_.IsEmpty()) { 259 if (!repaint_bounds_.IsEmpty()) {
260 // Adjust for rtl. 260 // Adjust for rtl.
261 repaint_bounds_.set_x(parent_->GetMirroredXWithWidthInView( 261 repaint_bounds_.set_x(parent_->GetMirroredXWithWidthInView(
262 repaint_bounds_.x(), repaint_bounds_.width())); 262 repaint_bounds_.x(), repaint_bounds_.width()));
263 parent_->SchedulePaintInRect(repaint_bounds_); 263 parent_->SchedulePaintInRect(repaint_bounds_);
264 repaint_bounds_.SetRect(0, 0, 0, 0); 264 repaint_bounds_.SetRect(0, 0, 0, 0);
265 } 265 }
266 266
267 FOR_EACH_OBSERVER(BoundsAnimatorObserver, 267 for (BoundsAnimatorObserver& observer : observers_)
268 observers_, 268 observer.OnBoundsAnimatorProgressed(this);
269 OnBoundsAnimatorProgressed(this));
270 269
271 if (!IsAnimating()) { 270 if (!IsAnimating()) {
272 // Notify here rather than from AnimationXXX to avoid deleting the animation 271 // Notify here rather than from AnimationXXX to avoid deleting the animation
273 // while the animation is calling us. 272 // while the animation is calling us.
274 FOR_EACH_OBSERVER(BoundsAnimatorObserver, 273 for (BoundsAnimatorObserver& observer : observers_)
275 observers_, 274 observer.OnBoundsAnimatorDone(this);
276 OnBoundsAnimatorDone(this));
277 } 275 }
278 } 276 }
279 277
280 void BoundsAnimator::AnimationContainerEmpty(AnimationContainer* container) { 278 void BoundsAnimator::AnimationContainerEmpty(AnimationContainer* container) {
281 } 279 }
282 280
283 } // namespace views 281 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | ui/views/focus/focus_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698