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

Side by Side Diff: ash/common/shelf/shelf_button.cc

Issue 2414303002: Remove usage of FOR_EACH_OBSERVER macro in ash/common (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 | « ash/common/shelf/shelf_background_animator.cc ('k') | ash/common/shelf/shelf_layout_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ash/common/shelf/shelf_button.h" 5 #include "ash/common/shelf/shelf_button.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/common/ash_constants.h" 9 #include "ash/common/ash_constants.h"
10 #include "ash/common/material_design/material_design_controller.h" 10 #include "ash/common/material_design/material_design_controller.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 114 }
115 return animation_; 115 return animation_;
116 } 116 }
117 117
118 // gfx::AnimationDelegate 118 // gfx::AnimationDelegate
119 void AnimationProgressed(const gfx::Animation* animation) override { 119 void AnimationProgressed(const gfx::Animation* animation) override {
120 if (animation != &animation_) 120 if (animation != &animation_)
121 return; 121 return;
122 if (!animation_.is_animating()) 122 if (!animation_.is_animating())
123 return; 123 return;
124 FOR_EACH_OBSERVER(Observer, observers_, AnimationProgressed()); 124 for (auto& observer : observers_)
125 observer.AnimationProgressed();
125 } 126 }
126 127
127 gfx::ThrobAnimation animation_; 128 gfx::ThrobAnimation animation_;
128 base::ObserverList<Observer> observers_; 129 base::ObserverList<Observer> observers_;
129 130
130 DISALLOW_COPY_AND_ASSIGN(ShelfButtonAnimation); 131 DISALLOW_COPY_AND_ASSIGN(ShelfButtonAnimation);
131 }; 132 };
132 133
133 } // namespace 134 } // namespace
134 135
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 bar_->SetHorizontalAlignment(views::ImageView::TRAILING); 594 bar_->SetHorizontalAlignment(views::ImageView::TRAILING);
594 bar_->SetVerticalAlignment(views::ImageView::CENTER); 595 bar_->SetVerticalAlignment(views::ImageView::CENTER);
595 break; 596 break;
596 } 597 }
597 bar_->SchedulePaint(); 598 bar_->SchedulePaint();
598 } 599 }
599 bar_->SetVisible(bar_id != 0 && state_ != STATE_NORMAL); 600 bar_->SetVisible(bar_id != 0 && state_ != STATE_NORMAL);
600 } 601 }
601 602
602 } // namespace ash 603 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/shelf/shelf_background_animator.cc ('k') | ash/common/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698