| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |