summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/network_menu_button.h
diff options
context:
space:
mode:
authorchocobo@google.com <chocobo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-28 04:11:00 +0000
committerchocobo@google.com <chocobo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-28 04:11:00 +0000
commit1f41000155f9659b8b9af077fc2af18e06b3aaa5 (patch)
tree644102c90cb474dea3005b432d9ec41e97db4e2d /chrome/browser/chromeos/network_menu_button.h
parent50c73bd0cd9ee2dcb7e31cd08992c19a7043fe29 (diff)
downloadchromium_src-1f41000155f9659b8b9af077fc2af18e06b3aaa5.zip
chromium_src-1f41000155f9659b8b9af077fc2af18e06b3aaa5.tar.gz
chromium_src-1f41000155f9659b8b9af077fc2af18e06b3aaa5.tar.bz2
New wifi icons animation.
BUG=none TEST=25538 Review URL: http://codereview.chromium.org/315008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30318 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/network_menu_button.h')
-rw-r--r--chrome/browser/chromeos/network_menu_button.h29
1 files changed, 24 insertions, 5 deletions
diff --git a/chrome/browser/chromeos/network_menu_button.h b/chrome/browser/chromeos/network_menu_button.h
index 4d2c3d0..c220bd6 100644
--- a/chrome/browser/chromeos/network_menu_button.h
+++ b/chrome/browser/chromeos/network_menu_button.h
@@ -18,6 +18,10 @@
class Browser;
class SkBitmap;
+namespace gfx {
+class Canvas;
+}
+
// The network menu button in the status area.
// This class will handle getting the wifi networks and populating the menu.
// It will also handle the status icon changing and connecting to another
@@ -59,20 +63,29 @@ class NetworkMenuButton : public StatusAreaButton,
// CrosNetworkLibrary::Observer implementation.
virtual void NetworkChanged(CrosNetworkLibrary* obj);
+ virtual void NetworkTraffic(CrosNetworkLibrary* cros,
+ int traffic_type);
+
+ protected:
+ // StatusAreaButton implementation.
+ virtual void DrawIcon(gfx::Canvas* canvas);
private:
// views::ViewMenuDelegate implementation.
virtual void RunMenu(views::View* source, const gfx::Point& pt);
- // Update the icon to either the connecting, connected, or disconnected icon.
- void UpdateIcon();
-
// Set to true if we are currently refreshing the menu.
bool refreshing_menu_;
// The number of wifi strength images.
static const int kNumWifiImages;
+ // The minimum opacity of the wifi bars.
+ static const int kMinOpacity;
+
+ // The maximum opacity of the wifi bars.
+ static const int kMaxOpacity;
+
// A list of wifi networks.
WifiNetworkVector wifi_networks_;
@@ -86,9 +99,15 @@ class NetworkMenuButton : public StatusAreaButton,
gfx::NativeWindow browser_window_;
// The throb animation that does the wifi connecting animation.
- ThrobAnimation animation_;
+ ThrobAnimation animation_connecting_;
+
+ // The throb animation that does the downloading animation.
+ ThrobAnimation animation_downloading_;
+
+ // The throb animation that does the uploading animation.
+ ThrobAnimation animation_uploading_;
- // The duration of the wifi connecting icon throbbing in milliseconds.
+ // The duration of the icon throbbing in milliseconds.
static const int kThrobDuration;
DISALLOW_COPY_AND_ASSIGN(NetworkMenuButton);