| 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/shelf/shelf_button.h" | 5 #include "ash/shelf/shelf_button.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/ash_constants.h" | 9 #include "ash/ash_constants.h" |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // gfx::AnimationDelegate | 91 // gfx::AnimationDelegate |
| 92 void AnimationProgressed(const gfx::Animation* animation) override { | 92 void AnimationProgressed(const gfx::Animation* animation) override { |
| 93 if (animation != &animation_) | 93 if (animation != &animation_) |
| 94 return; | 94 return; |
| 95 if (!animation_.is_animating()) | 95 if (!animation_.is_animating()) |
| 96 return; | 96 return; |
| 97 FOR_EACH_OBSERVER(Observer, observers_, AnimationProgressed()); | 97 FOR_EACH_OBSERVER(Observer, observers_, AnimationProgressed()); |
| 98 } | 98 } |
| 99 | 99 |
| 100 gfx::ThrobAnimation animation_; | 100 gfx::ThrobAnimation animation_; |
| 101 ObserverList<Observer> observers_; | 101 base::ObserverList<Observer> observers_; |
| 102 | 102 |
| 103 DISALLOW_COPY_AND_ASSIGN(ShelfButtonAnimation); | 103 DISALLOW_COPY_AND_ASSIGN(ShelfButtonAnimation); |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 } // namespace | 106 } // namespace |
| 107 | 107 |
| 108 namespace ash { | 108 namespace ash { |
| 109 | 109 |
| 110 //////////////////////////////////////////////////////////////////////////////// | 110 //////////////////////////////////////////////////////////////////////////////// |
| 111 // ShelfButton::BarView | 111 // ShelfButton::BarView |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 views::ImageView::CENTER, | 546 views::ImageView::CENTER, |
| 547 views::ImageView::CENTER, | 547 views::ImageView::CENTER, |
| 548 views::ImageView::LEADING)); | 548 views::ImageView::LEADING)); |
| 549 bar_->SchedulePaint(); | 549 bar_->SchedulePaint(); |
| 550 } | 550 } |
| 551 | 551 |
| 552 bar_->SetVisible(bar_id != 0 && state_ != STATE_NORMAL); | 552 bar_->SetVisible(bar_id != 0 && state_ != STATE_NORMAL); |
| 553 } | 553 } |
| 554 | 554 |
| 555 } // namespace ash | 555 } // namespace ash |
| OLD | NEW |