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

Side by Side Diff: ash/common/system/chromeos/network/network_icon_animation.h

Issue 2734653002: chromeos: Move files in //ash/common to //ash (Closed)
Patch Set: fix a11y tests, fix docs Created 3 years, 9 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
OLDNEW
(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_COMMON_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_ANIMATION_H_
6 #define ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_ANIMATION_H_
7
8 #include <set>
9 #include <string>
10
11 #include "ash/ash_export.h"
12 #include "base/observer_list.h"
13 #include "ui/gfx/animation/animation_delegate.h"
14 #include "ui/gfx/animation/throb_animation.h"
15
16 namespace ash {
17 namespace network_icon {
18
19 class AnimationObserver;
20
21 // Single instance class to handle icon animations and keep them in sync.
22 class ASH_EXPORT NetworkIconAnimation : public gfx::AnimationDelegate {
23 public:
24 NetworkIconAnimation();
25 ~NetworkIconAnimation() override;
26
27 // Returns the current animation value, [0-1].
28 double GetAnimation();
29
30 // The animation stops when all observers have been removed.
31 // Be sure to remove observers when no associated icons are animating.
32 void AddObserver(AnimationObserver* observer);
33 void RemoveObserver(AnimationObserver* observer);
34
35 // gfx::AnimationDelegate implementation.
36 void AnimationProgressed(const gfx::Animation* animation) override;
37
38 static NetworkIconAnimation* GetInstance();
39
40 private:
41 gfx::ThrobAnimation animation_;
42 base::ObserverList<AnimationObserver> observers_;
43 };
44
45 } // namespace network_icon
46 } // namespace ash
47
48 #endif // ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_ANIMATION_H_
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/network/network_icon.cc ('k') | ash/common/system/chromeos/network/network_icon_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698