Chromium Code Reviews| Index: ash/system/chromeos/network/network_icon_animation.h |
| diff --git a/ash/system/chromeos/network/network_icon_animation.h b/ash/system/chromeos/network/network_icon_animation.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a556e876d21ef06e697a221e996967086a828a7f |
| --- /dev/null |
| +++ b/ash/system/chromeos/network/network_icon_animation.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_ANIMATION_H_ |
| +#define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_ANIMATION_H_ |
| + |
| +#include "ash/ash_export.h" |
| +#include "base/observer_list.h" |
| +#include "ui/base/animation/animation_delegate.h" |
| +#include "ui/base/animation/throb_animation.h" |
| + |
| +namespace ash { |
| +namespace network_icon { |
| + |
| +class AnimationObserver; |
| + |
| +// Single instance class to handle icon animations and keep them in sync. |
| +class ASH_EXPORT NetworkIconAnimation : public ui::AnimationDelegate { |
| + public: |
| + NetworkIconAnimation(); |
| + virtual ~NetworkIconAnimation(); |
| + |
| + double GetAnimation(); |
|
jennyz
2013/01/31 19:16:50
Please add a comment for GetAnimation method.
|
| + |
| + void AddObserver(AnimationObserver* observer); |
| + void RemoveObserver(AnimationObserver* observer); |
| + |
| + // ui::AnimationDelegate implementation. |
| + virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
| + |
| + static NetworkIconAnimation* GetInstance(); |
| + |
| + private: |
| + ui::ThrobAnimation animation_; |
| + ObserverList<AnimationObserver> observers_; |
| +}; |
| + |
| +} // namespace network_icon |
| +} // namespace ash |
| + |
| +#endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_ANIMATION_H_ |