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

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

Issue 12094072: Use ash NetworkIconAnimation in NetworkMenuIcon code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address feedback Created 7 years, 10 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 | Annotate | Revision Log
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_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"
tfarina 2013/02/20 02:48:48 you could have forward declared it instead
12
13 namespace ash {
14 namespace network_icon {
tfarina 2013/02/20 02:48:48 why put this in this 'random' namespace?
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 // Returns the current animation value, [0-1].
25 double GetAnimation();
26
27 void AddObserver(AnimationObserver* observer);
28 void RemoveObserver(AnimationObserver* observer);
29
30 // ui::AnimationDelegate implementation.
31 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
tfarina 2013/02/20 02:48:48 this could have been private
32
33 static NetworkIconAnimation* GetInstance();
34
35 private:
36 ui::ThrobAnimation animation_;
tfarina 2013/02/20 02:48:48 and used scoped_ptr<ui::ThrobAnimation> ...
37 ObserverList<AnimationObserver> observers_;
38 };
tfarina 2013/02/20 02:48:48 DISALLOW_COPY_AND_ASSIGN
39
40 } // namespace network_icon
41 } // namespace ash
42
43 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_ANIMATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698