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

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

Issue 11361274: Add NetworkStateListDetailedView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix clang warning Created 8 years 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) 2012 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_H_
6 #define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_H_
7
8 #include <string>
9
10 #include "ui/gfx/image/image_skia.h"
11
12 namespace chromeos {
13 class NetworkState;
14 }
15
16 namespace ash {
17 namespace network_icon {
18
19 // Observer interface class for animating icons.
20 class AnimationObserver {
21 public:
22 // Called when the image has changed due to animation. The callback should
23 // trigger a call to GetImageForNetwork() to retrieve the image.
24 virtual void NetworkIconChanged() = 0;
25
26 protected:
27 virtual ~AnimationObserver() {}
28 };
29
30 // Color theme based on icon background.
31 enum ResourceColorTheme {
32 COLOR_DARK,
33 COLOR_LIGHT,
34 };
35
36 // Get the image for the network associated with |service_path|.
37 // |color| determines the color theme. If the icon is animating (i.e the
38 // network is connecting) and |observer| is provided, it will be notified
39 // when the icon changes.
40 gfx::ImageSkia GetImageForNetwork(const chromeos::NetworkState* network,
41 ResourceColorTheme color,
42 AnimationObserver* observer);
43
44 } // namespace network_icon
45 } // namespace ash
46
47 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_ICON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698