Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_ANIMATION_H_ | |
| 6 #define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_ANIMATION_H_ | |
| 7 | |
| 8 #include "ash/ash_export.h" | |
| 9 #include "base/observer_list.h" | |
| 10 #include "ui/base/animation/animation_delegate.h" | |
| 11 #include "ui/base/animation/throb_animation.h" | |
| 12 | |
| 13 namespace ash { | |
| 14 namespace network_icon { | |
| 15 | |
| 16 class AnimationObserver; | |
| 17 | |
| 18 // Single instance class to handle icon animations and keep them in sync. | |
| 19 class ASH_EXPORT NetworkIconAnimation : public ui::AnimationDelegate { | |
| 20 public: | |
| 21 NetworkIconAnimation(); | |
| 22 virtual ~NetworkIconAnimation(); | |
| 23 | |
| 24 double GetAnimation(); | |
|
jennyz
2013/01/31 19:16:50
Please add a comment for GetAnimation method.
| |
| 25 | |
| 26 void AddObserver(AnimationObserver* observer); | |
| 27 void RemoveObserver(AnimationObserver* observer); | |
| 28 | |
| 29 // ui::AnimationDelegate implementation. | |
| 30 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | |
| 31 | |
| 32 static NetworkIconAnimation* GetInstance(); | |
| 33 | |
| 34 private: | |
| 35 ui::ThrobAnimation animation_; | |
| 36 ObserverList<AnimationObserver> observers_; | |
| 37 }; | |
| 38 | |
| 39 } // namespace network_icon | |
| 40 } // namespace ash | |
| 41 | |
| 42 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_ANIMATION_H_ | |
| OLD | NEW |